[Soot-list] Eclipse Soot Plugin: Could not load classfile: java.io.ObjectInputStream

Wei MINN wei.minn.2018 at sis.smu.edu.sg
Mon May 13 10:36:43 EDT 2019


Hi everyone!

Newbie here, trying to set up Soot plugin in my Eclipse 4.3.2 (Kepler release). I was following the tutorial at https://github.com/Sable/soot/wiki/Running-Soot-as-Eclipse-Plugin.

I was able to download and install the plugin (Soot version 2.5.2). But when I right-clicked on the .java file in Eclipse's Package Explorer, and went to soot -> Process Source File -> Create Jimple, I got the error message below.

Starting from Soot's class library:
soot.Main --keep-line-number --xml-attributes --f J --src-prec java --cp /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/home/wei/kepler-workspace/SootTest/bin/:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/SootTest/src:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar::/home/wei/kepler-workspace/SootTest/src:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar --d /home/wei/kepler-workspace/SootTest/sootOutput A
Soot started on Mon May 13 21:20:43 SGT 2019
Unknown tag in constant pool: 16 at entry 866
java.lang.reflect.InvocationTargetException
    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 ca.mcgill.sable.soot.launching.SootThread.run(SootThread.java:138)
Caused by: java.lang.RuntimeException: Could not load classfile: java.io.ObjectInputStream
    at soot.coffi.Util.resolveFromClassFile(Util.java:75)
    at soot.CoffiClassSource.resolve(CoffiClassSource.java:39)
    at soot.SootResolver.bringToHierarchy(SootResolver.java:215)
    at soot.SootResolver.processResolveWorklist(SootResolver.java:155)
    at soot.SootResolver.resolveClass(SootResolver.java:124)
    at soot.Scene.tryLoadClass(Scene.java:417)
    at soot.Scene.loadBasicClasses(Scene.java:990)
    at soot.Scene.loadNecessaryClasses(Scene.java:1061)
    at soot.Main.run(Main.java:167)
    at soot.Main.main(Main.java:141)
    ... 5 more

It seems to say it cannot load  a java classfile called java.io.ObjectInputStream. I doubt that the problem stems from my Java installation as I could process via command-line. Below is the output of java -version from my Ubuntu 18.04 machine.

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Thank you!

Regards,

Wei Minn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20190513/c1a2e7d2/attachment.html>


More information about the Soot-list mailing list