Error while running BasicSetupExample
vinayaksh42 opened this issue · comments
I am encountering the following error while running the BasicSetupExample:
Command used:
mvn clean compile
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sootup.examples: Compilation failure: Compilation failure:
[ERROR] /Users/vinayaksh42/Desktop/Research/SootUp-Examples/BasicSetupExample/src/main/java/sootup/examples/BasicSetup.java:[26,73] cannot find symbol
[ERROR] symbol: method create(java.nio.file.Path,<nulltype>)
[ERROR] location: class sootup.java.bytecode.inputlocation.PathBasedAnalysisInputLocation
[ERROR] /Users/vinayaksh42/Desktop/Research/SootUp-Examples/BasicSetupExample/src/main/java/sootup/examples/BasicSetup.java:[28,30] incompatible types: sootup.core.inputlocation.AnalysisInputLocation cannot be converted to sootup.core.Project<sootup.java.core.JavaSootClass,? extends sootup.java.core.views.JavaView>
[ERROR] /Users/vinayaksh42/Desktop/Research/SootUp-Examples/BasicSetupExample/src/main/java/sootup/examples/BasicSetup.java:[45,55] incompatible types: java.lang.Object cannot be converted to sootup.core.model.SootClass
[ERROR] /Users/vinayaksh42/Desktop/Research/SootUp-Examples/BasicSetupExample/src/main/java/sootup/examples/BasicSetup.java:[56,87] incompatible types: java.lang.Object cannot be converted to sootup.core.model.SootMethod
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
One of the above error is originating from:
cannot find symbol
symbol: method create(java.nio.file.Path,<nulltype>)
location: class sootup.java.bytecode.inputlocation.PathBasedAnalysisInputLocation
I am not sure if it is due to my setup or problem with the project itself.
The issue was resolved after changing this line:
https://github.com/soot-oss/SootUp-Examples/blob/main/BasicSetupExample/pom.xml#L16
from:
<parent>
<groupId>org.soot-oss</groupId>
<artifactId>sootup</artifactId>
<version>1.1.2-SNAPSHOT</version>
</parent>
to:
<parent>
<groupId>org.soot-oss</groupId>
<artifactId>sootup</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
As 1.2.0-SNAPSHOT is the current version which has the create
method under sootup.java.bytecode.inputlocation.PathBasedAnalysisInputLocation and not 1.1.2-SNAPSHOT.
If required I can make a PR for it.