2 Replies Latest reply on Nov 24, 2008 10:40 AM by rhills

    Jboss Profiler 2.0 Beta 3 and JBoss AS 4.3.0.GA_CP02 -> NPE

    rhills

      We're running JBoss AS 4.3.0.GA_CP02 + Seam 2.1.0.GA and today I tried to install the Jboss Profiler 2.0 Beta 3 to do some profiling.

      I followed the readme.txt carefully, putting jboss-profiler.jar, jboss-profiler.properties, jboss-profiler-plugins.jar and javassist.jar in my jboss-as/bin directory and jboss-profiler.sar into my jboss-as/server/default/deploy directory (this is on my desktop development machine).

      Initially, I've not changed any of the configuration (jboss-profiler.properties or jboss-profiler.sar/META-INF/jboss-service.xml).

      I started up JBoss-AS without our own applications deployed and it seems to start cleanly. The first two lines in the log are:

      JBoss Profiler 2.0.Beta3 (Sun Microsystems Inc. 1.6.0_03)
      JBoss Profiler depends on external communication module
      


      I assume the second line is reporting a satisfied dependency and not an unsatisfied one!

      Later on, I see:

      2008-11-24 17:18:25,375 INFO [org.jboss.profiler.as.Profiler] JBoss Profiler: ProfilerMBean started
      2008-11-24 17:18:25,375 INFO [org.jboss.profiler.as.Communicator] JBoss Profiler: Communicator for JBoss Profiler 2.0.Beta3
      2008-11-24 17:18:25,406 INFO [org.jboss.profiler.as.Communicator] JBoss Profiler: Socket=0.0.0.0:5400
      2008-11-24 17:18:34,031 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] JBoss Web Services - Native
      2008-11-24 17:18:34,031 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] jbossws-native-2.0.1.SP2_CP03 (build=200808011456)
      2008-11-24 17:18:38,578 INFO [org.apache.catalina.core.AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.13.
      2008-11-24 17:18:38,578 INFO [org.apache.catalina.core.AprLifecycleListener] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
      2008-11-24 17:18:40,765 INFO [org.apache.coyote.http11.Http11AprProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8090
      2008-11-24 17:18:40,781 INFO [org.apache.coyote.http11.Http11AprProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8443
      


      However, as soon as I try and view my jmx-console, I get a NPE:

      2008-11-24 17:20:01,921 ERROR [org.apache.catalina.core.ContainerBase] Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
       at org.jboss.profiler.agent.ProfilerThreadImpl.allocation(ProfilerThreadImpl.java:226)
       at org.apache.jsp.index_jsp.<init>(index_jsp.java:7)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
       at java.lang.reflect.Constructor.newInstance(Unknown Source)
       at java.lang.Class.newInstance0(Unknown Source)
       at java.lang.Class.newInstance(Unknown Source)
       at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:323)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:853)
       at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
       at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
       at java.lang.Thread.run(Unknown Source)
      


      When I debug and stop at ProfilerThreadImpl.java, line 226, I find that activeFrame (and hence fi) is null and this apparently causes the NPE. Why is this happening? Is there something wrong with my configuration, or is there something in the newer version of JBoss (4.3) that's causing this?

      Cheers,

      Rob Hills
      Waikiki, Western Australia

        • 1. Re: Jboss Profiler 2.0 Beta 3 and JBoss AS 4.3.0.GA_CP02 ->
          jesper.pedersen

           

          I assume the second line is reporting a satisfied dependency and not an unsatisfied one!


          This means that the profiler depends on an external communication module to access it from a remote client - otherwise the only access to the information will be in-VM.


          When I debug and stop at ProfilerThreadImpl.java, line 226, I find that activeFrame (and hence fi) is null and this apparently causes the NPE. Why is this happening? Is there something wrong with my configuration, or is there something in the newer version of JBoss (4.3) that's causing this?


          Fixed in SVN -- I'll cut a new beta soon to get this fix out.

          Thanks for the feedback !

          • 2. Re: Jboss Profiler 2.0 Beta 3 and JBoss AS 4.3.0.GA_CP02 ->
            rhills

            Hi Jesper,

            Many thanks for the prompt response and fix. I can pull the changes from SVN (when I get to work in the morning) and build new jars and try it out.

            Cheers,

            Rob Hills