[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Soot API: Instrumenting EJB




Hi Feng,

It appears that the latest dev version @
http://www.sable.mcgill.ca/~fqian still causes the same RunTimeException
to be thrown when byte code instruction 168 is encouintered in a method's
instruction set.

Also, I found another bug in the Soot 1.2.2 API. If a method’s body is
empty then a NullPointerException is thrown when Soot tries to convert
the class’s byte codes into Soot’s intermediate representation:

So when Soot tries to activate an empty method: public void
ejbPassivate() {  }

Then the following NullPointerException is thrown:

java.lang.NullPointerException
        at soot.coffi.CFG.findOutmostJsrs(CFG.java:511)
        at soot.coffi.CFG.eliminateJsrRets(CFG.java:447)
        at soot.coffi.CFG.<init>(CFG.java:89)
        at
soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:87)
        at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:87)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:289)
        at
com.rtscinc.util.classloaders.XClassLoaderII.getXClassData(XClassLoad
erII.java:489)
        at
com.rtscinc.util.classloaders.XClassLoaderII.getClassData(XClassLoade
rII.java:399)
        at
com.rtscinc.util.classloaders.XClassLoaderII.findClass(XClassLoaderII
.java:350)
        at
com.rtscinc.util.classloaders.XClassLoaderII.loadClass(XClassLoaderII
.java:324)
        at com.rtscinc.util.Launcher.main(Launcher.java:32)
Loading weblogic.Server

Many of an EJB’s methods are empty by default:

public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void setSessionContext(javax.ejb.SessionContext cntx){}
public void valueBound(HttpSessionBindingEvent event) { }
etc.

Nathan