1

I use the following command to process java file

   -src-prec java  -cp "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar" -process-dir "/Users/.../test/src" -f jimple

I got error when process java source, how to solve it?

java.lang.ClassCastException: soot.JastAddJ.CONSTANT_Utf8_Info cannot be cast to soot.JastAddJ.CONSTANT_Class_Info
    at soot.JastAddJ.BytecodeParser.parseThisClass(BytecodeParser.java:437)
    at soot.JastAddJ.BytecodeParser.parseTypeDecl(BytecodeParser.java:404)
    at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:331)
    at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:301)
    at soot.JastAddJ.Attributes$TypeAttributes.innerClasses(Attributes.java:412)
    at soot.JastAddJ.Attributes$TypeAttributes.processAttribute(Attributes.java:316)
    at soot.JastAddJ.Attributes.attributes(Attributes.java:61)
    at soot.JastAddJ.Attributes$TypeAttributes.<init>(Attributes.java:307)
    at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:337)
    at soot.JastAddJ.BytecodeParser.read(BytecodeParser.java:27)
    at soot.JastAddJ.PathPart.getCompilationUnit(PathPart.java:115)
    at soot.JastAddJ.Program.getCompilationUnit(Program.java:887)
    at soot.JastAddJ.Program.getLibCompilationUnit_compute(Program.java:1531)
    at soot.JastAddJ.Program.getLibCompilationUnit(Program.java:1514)
    at soot.JastAddJ.Program.lookupLibType_compute(Program.java:1479)
    at soot.JastAddJ.Program.lookupLibType(Program.java:1447)
    at soot.JastAddJ.Program.lookupType_compute(Program.java:1426)
    at soot.JastAddJ.Program.lookupType(Program.java:1407)
    at soot.JastAddJ.Program.Define_TypeDecl_lookupType(Program.java:1995)
    at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
    at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
    at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
    at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
    at soot.JastAddJ.Expr.lookupType(Expr.java:1186)
    at soot.JastAddJ.TypeAccess.decls_compute(TypeAccess.java:425)
    at soot.JastAddJ.TypeAccess.decls(TypeAccess.java:414)

The error message shown as above

csytang
  • 33
  • 5

1 Answers1

1

It's a bug, which you should please report to the Soot issue tracker, with detailed information on how to reproduce the problem.

Eric
  • 1,343
  • 1
  • 11
  • 19
  • yep, I think this bug is related with the jdk, I use java 1.8, this bug occurs. When I turn to 1.7, it works well. – csytang Sep 01 '15 at 01:12
  • What do you mean by "using Java 8"? Do you execute Soot using Java 8 or do process Java 8 code with Soot? – Eric Sep 02 '15 at 06:00
  • Sorry, I have to make it clear. I execute Soot using Java 8 instead of processing Java 8 code. I find some issues raised at Soot's git. – csytang Sep 02 '15 at 06:56