[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Method not found although apparently exists
On Fri, Mar 07, 2003 at 01:13:34AM -0000, Eric Bodden wrote:
> Hi!
>
> Today I tested my application o a solaris system and got the following
> RuntimeException during CHA (including all context classes which were
> tagged as library classes for VTA preparation):
Since I don't have your particular application, I cannot reproduce the
exact error, but I did find a similar error when running Soot on
Solaris. The cause appears to be that Soot is finding more than one JDK
library on the soot-classpath. In version 1.2.5, I added a feature to
automatically add the current JDK to the end of the soot-classpath if it is
obtained by reading the $CLASSPATH environment variable, because the
JVM's appear to do the same thing, and many people were complaining that
their $CLASSPATH setting works fine for the JVM, but not for Soot. No
changes are made to the soot-classpath if it is explicitly specified
with the --soot-classpath switch. So, a workaround would be to specify
--soot-classpath $CLASSPATH to Soot. Does that fix your problem?
As for the feature of automatically adding rt.jar to the soot-classpath if
it is obtained from the $CLASSPATH environment variable, perhaps it
should only do so if there is no rt.jar in $CLASSPATH, or perhaps it
should be removed entirely. It is always possible to override it by
specifying --soot-classpath explicitly. I welcome comments on this.
I do not believe that this is a Solaris-only problem.
> Second questions:
> When such an error occurs, is it possible to let SOOT somehow ignore
> this error and to tel it something like "OK, continue anyway!" ? Or is
> no CHA possible with such an error.
Phantom references were designed to do this. However, even with the
--allow-phantom-refs switch, at that particular point, phantom refs are
forbidden. Could the person who wrote the code forbidding them there
(allowsPhantomRefs field in Scene) please explain why?
On Fri, Mar 07, 2003 at 10:41:14AM -0000, Eric Bodden wrote:
> BTW: Is the setting definitelyForbidPhantomRefs new or does it have a
> new default value?
This is new in Soot 1.2.5.
Phantom classes can cause unpredictable behaviour in various parts of
Soot if not used with caution. We were getting flooded with various bug
reports from people who didn't make their library classes available to
Soot. These "bugs" were caused by all the phantom classes, but the
reports didn't mention anything about the many phantom class warnings.
Therefore, as of Soot 1.2.5, the default is to no allow phantom
references at all. This can be changed with the --allow-phantom-refs
switch for the rare cases where phantom refs are required. Giving this
switch makes Soot allow phantom refs in the places where they were
allowed in previous versions. There is still a variable in Scene which
makes Soot forbid phantom references at various times. I don't know
anything about the reasoning behind that one; perhaps someone else can
explain it.
Ondrej