Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-9822

java.lang.IllegalStateException: Instrumentation is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • EAP 6.0.0
    • None
    • ALL OS
      EAP 6

    • Hide

      1. Deploy testWAR.war by placing it in standalone/deployments and creating testWAR.war.dodeploy

      2. Please add the jar as below in standalone.conf:

      JAVA_OPTS="$JAVA_OPTS -javaagent:/home/mkhandek/Downloads/SizeOf_0_2_1/SizeOf.jar"

      See "JAVAGENT: call premain instrumentation for class SizeOf" when sever comes up.

      3. Now hit jsp from application attached(testWAR.war.zip).

      I tried using it in EAP 6 initially and reproduced the issue.

      However, I checked in EAP 5.1.2, it is not null.

      Attached the test case that we used to see.

      And we modified SizeOf to add debug and see if object is null all the time.

      Java options include: -javaagent:/home/mkhandek/Downloads/MyAgent.jar

      Now, we added a debug in SizeOf class and we can see that, while server starting up, the instrumentation object is not null.

      JAVAGENT: call premain instrumentation for class SizeOf inst: sun.instrument.InstrumentationImpl@1d9dc39

      It becomes null at some later point.

      Show
      1. Deploy testWAR.war by placing it in standalone/deployments and creating testWAR.war.dodeploy 2. Please add the jar as below in standalone.conf: JAVA_OPTS="$JAVA_OPTS -javaagent:/home/mkhandek/Downloads/SizeOf_0_2_1/SizeOf.jar" See "JAVAGENT: call premain instrumentation for class SizeOf" when sever comes up. 3. Now hit jsp from application attached(testWAR.war.zip). I tried using it in EAP 6 initially and reproduced the issue. However, I checked in EAP 5.1.2, it is not null. Attached the test case that we used to see. And we modified SizeOf to add debug and see if object is null all the time. Java options include: -javaagent:/home/mkhandek/Downloads/MyAgent.jar Now, we added a debug in SizeOf class and we can see that, while server starting up, the instrumentation object is not null. JAVAGENT: call premain instrumentation for class SizeOf inst: sun.instrument.InstrumentationImpl@1d9dc39 It becomes null at some later point.
    • NEW

    Description

      When trying to use the SizeOf project from sourceforge (http://sourceforge.net/projects/sizeof/), which requires setting -javaagent:/path/to/SizeOf.jar, the instrumentation variable is always null.

      This is working with EAP 5.1.2 but not with EAP6.

      Stack Trace:

      java.lang.IllegalStateException: Instrumentation is null
      at net.sourceforge.sizeof.SizeOf.sizeOf(SizeOf.java:59) [SizeOf-1.0.jar:]
      at net.sourceforge.sizeof.SizeOf.deepSizeOf(SizeOf.java:145) [SizeOf-1.0.jar:]
      at net.sourceforge.sizeof.SizeOf.deepSizeOf(SizeOf.java:102) [SizeOf-1.0.jar:]
      at com.redhat.consulting.servlet.IspnTest.doGet(IspnTest.java:63) [classes:]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]

      Attachments

        Activity

          People

            rhn-support-bmaxwell Brad Maxwell
            mkhandek Mugdha Khandekar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: