[Soot-list] soot.AbstractSootFieldRef$FieldResolutionFailedException

Asif Iqbal iqbala24 at mcmaster.ca
Fri Oct 15 13:11:58 EDT 2010


Hi all,

I am trying to generate an XML file for a class using both command  
line and by calling Soot's Main.main() from inside my own Java  
application. The command line works fine but calling main() from my  
application raises the following exception:

Exception in thread "main" soot.AbstractSootFieldRef 
$FieldResolutionFailedException: Class soot.Main doesn't have field  
keepLineNumberAttribute : boolean; failed to resolve in superclasses  
and interfacesLooking in soot.Main which has fields [<soot.Main:  
java.lang.String versionString>, <soot.Main: java.util.Date start>,  
<soot.Main: java.util.Date finish>, <soot.Main: java.lang.String[]  
cmdLineArgs>]
Looking in java.lang.Object which has fields []

I have no idea what this means. I have added the same paths to  
Scene.v().setSootClasspath() as I have done in the command line. But  
what's going wrong here ?

Below is my command line which works fine:

java -Xmx800m -cp  
sootclasses 
-2.4.0.jar:jasminclasses-2.4.0.jar:polyglotclasses-1.3.5.jar soot.Main  
-cp .:/Users/asifiqbal/Downloads/soylatte/jre/lib/rt.jar:/Users/ 
asifiqbal/Downloads/soylatte/jre/lib/jce.jar:swing- 
layout.jar:jh.jar:tools.jar:xerces.jar:log4j.jar:log4j- 
core.jar:sootclasses-1.2.5-modified.jar:janalyzer_onlinehelp.jar:swing- 
layout.jar:./janalyzer -f X analysis.TypeResolver

And below is the code snippet which raises that exception:

.....
	Scene.v().setSootClassPath(Scene.v().getSootClassPath() +
                 "sootclasses-2.4.0.jar:" +
                 "jasminclasses-2.4.0.jar:" +
                 "polygotclasses-1.3.5.jar:" +
                 ":.:" +
                  "/Users/asifiqbal/Downloads/soylatte/jre/lib/ 
rt.jar:" +
		 "/Users/asifiqbal/Downloads/soylatte/jre/lib/jce.jar:" +
                  "swing-layout.jar:" +
                  "jh.jar:" +
                  "tools.jar:" +
                  "xerces.jar:" +
                  "log4j.jar:" +
                  "log4j-core.jar:" +
                  "sootclasses-1.2.5-modified.jar:" +
                  "janalyzer_onlinehelp.jar:" +
                  "swing-layout.jar:" +
                  "./janalyzer");


         String[] args1 = {"-f", "X", "analysis.TypeResolver"};

         Main.main(args1);
.....

Any help would be greatly appreciated.

Asif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20101015/32db046d/attachment.html 


More information about the Soot-list mailing list