[jboss-jira] [JBoss JIRA] Created: (JASSIST-88) It is not possible to instrument class Object because of: [source error] cannot find the super class of java.lang.Object

Martin Burger (JIRA) jira-events at lists.jboss.org
Thu Jul 16 04:17:30 EDT 2009


It is not possible to instrument class Object because of: [source error] cannot find the super class of java.lang.Object
------------------------------------------------------------------------------------------------------------------------

                 Key: JASSIST-88
                 URL: https://jira.jboss.org/jira/browse/JASSIST-88
             Project: Javassist
          Issue Type: Bug
    Affects Versions: 3.10.0.GA
            Reporter: Martin Burger
            Assignee: Shigeru Chiba


I would like to instrument the constructor in class Object. However, class MemberResolver (part of Javassist's compiler) cannot find its superclass. Of course, there is no superclass.

Exception:

javassist.CannotCompileException: [source error] cannot find the super class of java.lang.Object
	at javassist.CtBehavior.setBody(CtBehavior.java:368)
	at javassist.CtBehavior.setBody(CtBehavior.java:334)
	at javassist.CtConstructor.setBody(CtConstructor.java:216)
	at de.unisb.cs.st.deltadebugging.jinsi.agent.capture.CaptureAgent.premain(CaptureAgent.java:33)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
	at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: compile error: cannot find the super class of java.lang.Object
	at javassist.compiler.MemberResolver.getSuperclass(MemberResolver.java:490)
	at javassist.compiler.MemberCodeGen.insertDefaultSuperCall(MemberCodeGen.java:80)
	at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:288)
	at javassist.compiler.Javac.compileBody(Javac.java:222)
	at javassist.CtBehavior.setBody(CtBehavior.java:360)
	... 9 more

In javassist.compiler.CodeGen.atMethodBody(Stmnt, boolean, boolean) the call to method javassist.compiler.CodeGen.needsSuperCall(Stmnt) should return false instead of true, I assume. At least this seems to be the location where this bug could be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list