[Soot-list] soot.AbstractSootFieldRef$FieldResolutionFailedException

Asif Iqbal iqbala24 at mcmaster.ca
Mon Oct 18 12:21:21 EDT 2010


Hi Eric,

I have tried what you suggested but that doesn't work. It throws the  
same exception. By the way I should let you know that my code (that I  
sent in the previous email) worked for most other classes but it is  
generating the exception only for a few classes. In fact I was running  
soot on your JAnalyzer class files. Of all the class files, only  
analysis.TypeResolver and system.Main threw this exception. For all  
other class files, the xml was generated successfully. I still don't  
know what's going wrong with these class files.

Asif

On 18-Oct-10, at 6:50 AM, Eric Bodden wrote:

> Hi Asif.
>
> I think the problem may be that your call to main(..) overrides your
> settings for the sootclasspath. Could you try just adding the -cp
> <classpath> argument to the args1 array as you do for the other
> arguments?
>
> Eric
>
>
> --
> Dr. Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>
>
>
> On 15 October 2010 19:11, Asif Iqbal <iqbala24 at mcmaster.ca> wrote:
>> 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
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20101018/831198ec/attachment.html 


More information about the Soot-list mailing list