[Soot-list] soot.AbstractSootFieldRef$FieldResolutionFailedException

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Mon Oct 18 06:50:56 EDT 2010


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
>
>


More information about the Soot-list mailing list