Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependency when using botsing-maven-plugin #58

Closed
gibello opened this issue Mar 12, 2019 · 16 comments
Closed

Missing dependency when using botsing-maven-plugin #58

gibello opened this issue Mar 12, 2019 · 16 comments
Assignees
Labels
bug Something isn't working maven-plugin This issue is related to the Maven plugin.

Comments

@gibello
Copy link

gibello commented Mar 12, 2019

Characteristics

  • Issue Type: [bug]
  • Reproducibility: [always]
  • Severity: [crash]
  • Tool/Service/Component: [Botsing maven plugin]
  • Execution Environment: [Linux Ubuntu 18.04]
  • Reporter: [Pierre-Yves Gibello, [email protected]]

Description

Tried to run botsing maven plugin on a stack trace from ow2 authzforce project ( https://gitlab.ow2.org/authzforce)
mvn eu.stamp-project:botsing-maven:botsing -Dcrash_log=/tmp/ex1.log -Dtarget_frame=2 -e

An exception (String index out of range) is raised in Botsing, looks like a parsing issue:

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring (String.java:1927)
at eu.stamp.botsing.StackTrace.stringToStackTraceElement (StackTrace.java:98)
at eu.stamp.botsing.StackTrace.setup (StackTrace.java:77)
at eu.stamp.botsing.CrashProperties.setupStackTrace (CrashProperties.java:180)
at eu.stamp.botsing.Botsing.setupStackTrace (Botsing.java:117)
at eu.stamp.botsing.Botsing.parseCommandLine (Botsing.java:63)
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:96)

Steps to reproduce

Exception file used attached
ex1.log

Full stack trace

[ERROR] Failed to execute goal eu.stamp-project:botsing-maven:1.0.3:botsing (default-cli) on project authzforce-ce-core: Error executing Botsing: String index out of range: -1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal eu.stamp-project:botsing-maven:1.0.3:botsing (default-cli) on project authzforce-ce-core: Error executing Botsing
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing Botsing
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:99)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring (String.java:1927)
at eu.stamp.botsing.StackTrace.stringToStackTraceElement (StackTrace.java:98)
at eu.stamp.botsing.StackTrace.setup (StackTrace.java:77)
at eu.stamp.botsing.CrashProperties.setupStackTrace (CrashProperties.java:180)
at eu.stamp.botsing.Botsing.setupStackTrace (Botsing.java:117)
at eu.stamp.botsing.Botsing.parseCommandLine (Botsing.java:63)
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:96)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

@pderakhshanfar
Copy link
Collaborator

Currently, we are not supporting the chained stack traces. ENGINEERING is working on a pre-processing module to parse all types of the stack traces. For now, You should choose only one of the stack traces as input. For instance, The given log file should be like this:

java.lang.RuntimeException: Failed to load XML schemas: [classpath:pdp.xsd]
	at org.ow2.authzforce.core.pdp.impl.SchemaHandler.createSchema(SchemaHandler.java:541)
	at org.ow2.authzforce.core.pdp.impl.PdpModelHandler.<init>(PdpModelHandler.java:159)
	at org.ow2.authzforce.core.pdp.impl.PdpEngineConfiguration.getInstance(PdpEngineConfiguration.java:682)
	at org.ow2.authzforce.core.pdp.impl.PdpEngineConfiguration.getInstance(PdpEngineConfiguration.java:699)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)

or this:

org.xml.sax.SAXParseException:
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4154)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaFatalError(XSDHandler.java:4133)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2174)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2084)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1014)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1126)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:625)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:610)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:569)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:535)
	at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:254)
	at org.ow2.authzforce.core.pdp.impl.SchemaHandler.createSchema(SchemaHandler.java:537)

@gibello
Copy link
Author

gibello commented Mar 13, 2019

Ok, there should be an error message then, never an "index out of bounds"...

Works better now (tried the 1st one), but the generated test class has one empty method called "notGeneratedAnyTest()". Took 30 minutes with a lots of logs like this one:
[INFO] Seeing class for first time: com.google.common.collect.Table
[INFO] Error while loading class: java.lang.ClassNotFoundException: Class 'com/google/common/collect/Table.class' should be in target project, but could not be found!

Final messages from Botsing say that "the target crash is not covered":

[INFO] MaxTime : 1,801 / 1,800 Finished!
[INFO] Best fitness in the current population: 4.5 | 45600
[INFO] MaxTime : 1,801 / 1,800 Finished!
[INFO] The search process is finished.
[INFO] Best fitness in the final population is: 4.5. PT: 17 seconds
[INFO] * The target crash is not covered! The best solution has 4.5 fitness value.
[INFO] The best test is:(non-minimized version:
)
[INFO] * Minimizing test suite
[INFO] Minimization Strategy: TOTAL_LENGTH, 0 tests
[INFO] Minimizing per test
[INFO] Considering goal: eu.stamp.botsing.fitnessfunction.WeightedSum@749ee102
[INFO] Goal is not covered: eu.stamp.botsing.fitnessfunction.WeightedSum@749ee102
[INFO] Minimized suite covers 0/1 goals
[INFO] Setting coverage to: 0.0
[INFO] Failed to cover: eu.stamp.botsing.fitnessfunction.WeightedSum@749ee102
[INFO] * Compiling and checking tests
[INFO] Going to execute: removeTestsThatDoNotCompile
[INFO] Going to execute: handleTestsThatAreUnstable
[INFO] * Writing JUnit test case 'PdpModelHandler_ESTest' to crashreproduction-tests
[INFO] The solution test is saved!
[INFO] Stopping Botsing
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

@pderakhshanfar
Copy link
Collaborator

The generated test will be saved when Botsing reaches to fitness function 0. In your case, you executed Botsing on your crash for 17 seconds, and it reaches to fitness function value 4.5. I suggest you increase the search budget. Also, it would be helpful if you can try this crash by different target frames. You can set the target frame to any frame which points to a class in your project. For instance for the following stack trace, you can try with frame levels 1, 2, 3, and 4.

java.lang.RuntimeException: Failed to load XML schemas: [classpath:pdp.xsd]
    at org.ow2.authzforce.core.pdp.impl.SchemaHandler.createSchema(SchemaHandler.java:541)
    at org.ow2.authzforce.core.pdp.impl.PdpModelHandler.<init>(PdpModelHandler.java:159)
    at org.ow2.authzforce.core.pdp.impl.PdpEngineConfiguration.getInstance(PdpEngineConfiguration.java:682)
    at org.ow2.authzforce.core.pdp.impl.PdpEngineConfiguration.getInstance(PdpEngineConfiguration.java:699)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)

@gibello
Copy link
Author

gibello commented Mar 14, 2019

Just tried today, after git pull (version is now 1.0.4-SNAPSHOT, with evosuite 1.0.7 installed).
On your last exception, called that:

mvn eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT:botsing -Dcrash_log=/tmp/ex1.log -Dtarget_frame=4 -Dorg.slf4j.simpleLogger.log.org.evosuite=off -Dorg.slf4j.simpleLogger.showLogName=true

Error follows (looks like a maven dependencty issue ?):
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.349 s
[INFO] Finished at: 2019-03-14T09:27:58+01:00
[INFO] Final Memory: 37M/299M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT:botsing (default-cli) on project authzforce-ce-core-pdp-engine: Execution default-cli of goal eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT:botsing failed: An API incompatibility was encountered while executing eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT:botsing: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: com/google/common/base/Function
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/gibello/.m2/repository/eu/stamp-project/botsing-maven/1.0.4-SNAPSHOT/botsing-maven-1.0.4-SNAPSHOT.jar
[ERROR] urls[1] = file:/home/gibello/.m2/repository/eu/stamp-project/botsing-reproduction/1.0.4-SNAPSHOT/botsing-reproduction-1.0.4-SNAPSHOT.jar
[ERROR] urls[2] = file:/home/gibello/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[3] = file:/home/gibello/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar
[ERROR] urls[4] = file:/home/gibello/.m2/repository/org/apache/maven/plugin-testing/maven-plugin-testing-harness/3.3.0/maven-plugin-testing-harness-3.3.0.jar
[ERROR] urls[5] = file:/home/gibello/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[6] = file:/home/gibello/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
[ERROR] urls[7] = file:/home/gibello/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[8] = file:/home/gibello/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
[ERROR] urls[9] = file:/home/gibello/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[10] = file:/home/gibello/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[11] = file:/home/gibello/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.1.1/maven-resolver-util-1.1.1.jar
[ERROR] urls[12] = file:/home/gibello/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.24/plexus-interpolation-1.24.jar
[ERROR] urls[13] = file:/home/gibello/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
[ERROR] urls[14] = file:/home/gibello/.m2/repository/org/apache/maven/maven-builder-support/3.5.4/maven-builder-support-3.5.4.jar
[ERROR] urls[15] = file:/home/gibello/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
[ERROR] urls[16] = file:/home/gibello/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar
[ERROR] urls[17] = file:/home/gibello/.m2/repository/com/google/inject/guice/4.2.0/guice-4.2.0-no_aop.jar
[ERROR] urls[18] = file:/home/gibello/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[19] = file:/home/gibello/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar
[ERROR] urls[20] = file:/home/gibello/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar
[ERROR] urls[21] = file:/home/gibello/.m2/repository/org/eclipse/aether/aether-util/1.0.2.v20150114/aether-util-1.0.2.v20150114.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : Class 'com/google/common/base/Function.class' should be in target project, but could not be found!

@pderakhshanfar
Copy link
Collaborator

Hi @gibello
Thank you for using the new version. Version 1.0.4 is not stable yet. I think it is better for now if you can use the latest stable version which you were using before the pull. We will inform everybody in stamp when we release a new version.

@xdevroey
Copy link
Member

@luandrea could you check that guava is indeed in the classpath built by eu.stamp.botsing.BotsingMojo.execute when invoking eu.stamp.botsing.Botsing.parseCommandLine?

@luandrea
Copy link
Contributor

Hi @gibello ,
I wanted to add something to what @pderakhshanfar said in the comment before and I don't know if you already tried it.
You should use botsing-reproduction 1.0.3 that is easier to use. You just need to create a folder with all the dependencies and execute botsing reproduction as a jar. Let me know if this works.

@luandrea
Copy link
Contributor

Hi @xdevroey,
guava is a dependecy required by maven-core:jar:3.5.4.

@xdevroey
Copy link
Member

Yes, but that does not mean that the class loader of the instrumentation mechanism used in Botsing has access to it. If it is not provided when calling eu.stamp.botsing.Botsing.parseCommandLine, the Guava classes cannot be loaded.

@pderakhshanfar tried to run botsing in command line on the authzforce project and he could replicate the first frame of the stack trace provided by @gibello.

Could you check that the guava jar is in the classpath built by eu.stamp.botsing.BotsingMojo.execute?

@luandrea
Copy link
Contributor

luandrea commented Mar 14, 2019

Sorry @xdevroey , I didn't understand your request.
You are right, in the maven log, in the initialization phase there should be a list of the dependencies that are used, something like this:
`[INFO] eu.stamp.botsing.reproduction.CrashReproduction - Starting the dependency analysis. The number of detected jar files is 4.

[INFO] evo_logger - - /home/luca/Progetti/stamp/botsing/botsing-examples/target/classes

[INFO] evo_logger - - /home/luca/.m2/repository/junit/junit/4.12/junit-4.12.jar

[INFO] evo_logger - - /home/luca/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar

[INFO] evo_logger - - /home/luca/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar

[INFO] eu.stamp.botsing.reproduction.CrashReproduction - Analysing dependencies done!`

@gibello: Can you see something like this in your Maven output? Can you add it here?

@gibello
Copy link
Author

gibello commented Mar 15, 2019

Hi,
I just tried botsing 1.0.3 this way (with ./dependencies containing all the jars of authzforce + all the deps I could get with maven dependency plugin)

java -jar /home/gibello/.m2/repository/eu/stamp-project/botsing-reproduction/1.0.3/botsing-reproduction-1.0.3.jar -crash_log /tmp/ex1.log -target_frame 4 -project_cp ./dependencies/

I get this (and botsing never exits - at least for one hour, then I stopped it):

09:28:06.718 [main] INFO e.s.b.reproduction.CrashReproduction - Starting the dependency analysis. The number of detected jar files is 119.
Exception in thread "main" java.util.ServiceConfigurationError: org.ow2.authzforce.core.pdp.api.PdpExtension: Provider org.ow2.authzforce.core.pdp.testutil.ext.TestAttributeProvider$Factory not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
at java.util.ServiceLoader$LazyIterator.access$700(ServiceLoader.java:323)
at java.util.ServiceLoader$LazyIterator$2.run(ServiceLoader.java:407)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:409)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.ow2.authzforce.core.pdp.impl.PdpExtensions.(PdpExtensions.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.evosuite.setup.TestClusterUtils.getClass(TestClusterUtils.java:312)
at org.evosuite.setup.TestClusterGenerator.initializeTargetMethods(TestClusterGenerator.java:663)
at org.evosuite.setup.TestClusterGenerator.generateCluster(TestClusterGenerator.java:134)
at org.evosuite.setup.DependencyAnalysis.analyze(DependencyAnalysis.java:118)
at org.evosuite.setup.DependencyAnalysis.analyzeClass(DependencyAnalysis.java:132)
at eu.stamp.botsing.reproduction.CrashReproduction.initializeTargetClass(CrashReproduction.java:200)
at eu.stamp.botsing.reproduction.CrashReproduction.generateCrashReproductionTests(CrashReproduction.java:103)
at eu.stamp.botsing.reproduction.CrashReproduction.execute(CrashReproduction.java:78)
at eu.stamp.botsing.Botsing.parseCommandLine(Botsing.java:68)
at eu.stamp.botsing.Botsing.main(Botsing.java:161)

@xdevroey
Copy link
Member

Ok, so the original issue is in the Maven plugin. In the command line, it could at least start the dependency analysis. I have opened another issue with your last comment @gibello. See #61

@xdevroey
Copy link
Member

@luandrea can you try to run the Maven plugin on the project and see why there are missing dependencies in the project_cp passed to eu.stamp.botsing.Botsing.parseCommandLine?

@xdevroey xdevroey changed the title StringIndexOutOfRange exception in parseCommandLine() causes botsing crash Missing dependency when using botsing-maven-plugin Mar 15, 2019
@xdevroey
Copy link
Member

xdevroey commented Mar 22, 2019

I made a new release, please see botsing-1.0.4

@xdevroey xdevroey added bug Something isn't working maven-plugin This issue is related to the Maven plugin. labels Mar 22, 2019
@luandrea
Copy link
Contributor

luandrea commented Apr 2, 2019

I just run botsing-maven 1.0.5-SNAPSHOT on pdp-engine module of authzforce-core and succesfully generated a reproduction test.
Could you confirm that this works also for you, @gibello?
N.B. Update your botsing local repository and rebuild botsing-maven before trying.

@gibello
Copy link
Author

gibello commented Apr 3, 2019

I confirm, thanks @luandrea and all :)

@luandrea luandrea closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maven-plugin This issue is related to the Maven plugin.
Projects
None yet
Development

No branches or pull requests

4 participants