wh1t3p1g / tabby

A CAT called tabby ( Code Analysis Tool )
https://www.yuque.com/wh1t3p1g/tp0c1t/lf12lg69ngh47akx
Apache License 2.0
1.3k stars 153 forks source link

【报错】None of the basic classes could be loaded! Check your Soot class path! #86

Closed kuron3k0 closed 9 months ago

kuron3k0 commented 9 months ago

大佬,请问一下这个报错需要怎么解决,我是jdk17

java.lang.RuntimeException: java.lang.RuntimeException: None of the basic classes could be loaded! Check your Soot class path!
        at tabby.core.Analyser.runSootAnalysis(Analyser.java:119) ~[!/:na]
        at tabby.core.Analyser.run(Analyser.java:78) ~[!/:na]
        at tabby.App.lambda$run$1(App.java:70) ~[!/:na]
        at org.springframework.boot.SpringApplication.lambda$callRunner$5(SpringApplication.java:798) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:83) ~[spring-core-6.1.2.jar!/:6.1.2]
        at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60) ~[spring-core-6.1.2.jar!/:6.1.2]
        at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:88) ~[spring-core-6.1.2.jar!/:6.1.2]
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:782) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:na]
        at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:na]
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[na:na]
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:782) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:341) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1358) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1347) ~[spring-boot-3.2.1.jar!/:3.2.1]
        at tabby.App.main(App.java:32) ~[!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91) ~[tabby.jar:1.3.0]
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53) ~[tabby.jar:1.3.0]
        at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58) ~[tabby.jar:1.3.0]
Caused by: java.lang.RuntimeException: None of the basic classes could be loaded! Check your Soot class path!
        at soot.Scene.loadBasicClasses(Scene.java:1843) ~[soot-4.4.1.jar!/:na]
        at tabby.core.Analyser.runSootAnalysis(Analyser.java:89) ~[!/:na]
        ... 29 common frames omitted

配置文件如下

tabby.build.target                        = target/commons-collections-3.2.2.jar
tabby.build.libraries                     = libs
tabby.build.mode                          = gadget
tabby.output.directory                    = ./output/dev

# debug
tabby.debug.details                       = false

# jdk settings
tabby.build.isJRE9Module                  = true
tabby.build.javaHome                      = /usr/local/java/jdk-17.0.10+7/
tabby.build.isJDKProcess                  = false
tabby.build.withAllJDK                    = false
tabby.build.isJDKOnly                     = false

# dealing fatjar
tabby.build.checkFatJar                   = true

# pointed-to analysis
tabby.build.isFullCallGraphCreate         = false
tabby.build.thread.timeout                = 2
tabby.build.isNeedToCreateIgnoreList      = false
wh1t3p1g commented 9 months ago

没有找到对应的jdk依赖,重新clone一下最新的代码吧。我把这个功能默认关掉了

kuron3k0 commented 9 months ago

可以了,多谢大佬