[Soot-list] Problem with classpath / J2ME

Marco Kaufmann marco5327 at yahoo.de
Tue May 22 19:55:38 EDT 2007


Hi,
   
  I'm trying to use soot for optimizing the PhoneME CLDC 1.0 core classes. But running soot with the following command line arguments:
   
  -w -cp ...\CLDC10 java.lang.Object (same for all other classes) 
   
  throws this exception:
   
  Exception in thread "main" java.lang.RuntimeException: This operation requires resolving level HIERARCHY but java.lang.Cloneable is at resolving level DANGLING
        at soot.SootClass.checkLevel(SootClass.java:122)
        at soot.SootClass.hasSuperclass(SootClass.java:711)
        at soot.jimple.toolkits.typing.TypeNode.<init>(TypeNode.java:86)
        at soot.jimple.toolkits.typing.ClassHierarchy$ConstructorChooser.caseRefType(ClassHierarchy.java:231)
        at soot.RefType.apply(RefType.java:142)
        at soot.jimple.toolkits.typing.ClassHierarchy$ConstructorChooser.typeNode(ClassHierarchy.java:224)
        at soot.jimple.toolkits.typing.ClassHierarchy.typeNode(ClassHierarchy.java:121)
        at soot.jimple.toolkits.typing.ClassHierarchy.<init>(ClassHierarchy.java:76)
        at soot.jimple.toolkits.typing.ClassHierarchy.classHierarchy(ClassHierarchy.java:99)
        at soot.jimple.toolkits.typing.TypeResolver.<init>(TypeResolver.java:153)
        at soot.jimple.toolkits.typing.TypeResolver.resolve(TypeResolver.java:178)
        at soot.jimple.toolkits.typing.TypeAssigner.internalTransform(TypeAssigner.java:55)
        at soot.BodyTransformer.transform(BodyTransformer.java:51)
        at soot.Transform.apply(Transform.java:104)
        at soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:66)
        at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:89)
        at soot.Pack.apply(Pack.java:120)
        at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:117)
        at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:329)
        at soot.PackManager.retrieveAllBodies(PackManager.java:958)
        at soot.PackManager.runPacks(PackManager.java:328)
        at soot.Main.run(Main.java:202)
        at soot.Main.main(Main.java:145)
   
  Anyone knows what's wrong there? The strange thing is, that interface Cloneable is not even part of CLDC 1.0 (thus java/lang/Cloneable.class does not exist in the classpath). The message is thrown only by the constructor of TypeAssigner (the line is "hierarchy = ClassHierarchy.classHierarchy(scene);"), after all other classes have yet successfully been solved.
   
  Thanks and regards,
  Marco
   
  PS: At the end of the TypeAssigner constructor there are those, looks like they had anything to do with this. However, these lines are not even reached because the exception is thrown before that.
   
      //  hack for J2ME library, reported by Stephen Cheng 
      if (!G.v().isJ2ME) {
        typeVariable(hierarchy.CLONEABLE);
        typeVariable(hierarchy.SERIALIZABLE);
      }     

       
---------------------------------
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem  neuen Yahoo! Mail. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20070523/edba64d6/attachment-0001.htm


More information about the Soot-list mailing list