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

Error while running BasicSetupExample #1

Open
vinayaksh42 opened this issue Feb 7, 2024 · 1 comment
Open

Error while running BasicSetupExample #1

vinayaksh42 opened this issue Feb 7, 2024 · 1 comment

Comments

@vinayaksh42
Copy link

vinayaksh42 commented Feb 7, 2024

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.

@vinayaksh42
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant