2 Replies Latest reply: Apr 19, 2011 6:13 PM by Rafael Soares (Tuelho) RSS

    java.lang.Error: Failed to transform class

    Rafael Soares (Tuelho) Novice

      Hello!

       

      I'm trying to submmit a rule using the bmsubmit.sh scritp, but when I ran the cmd './bmsubmit -l' to list the rules applied to bm agent I get the following error:

       

       

      $ ./bmsubmit.sh -p 9091 -l
      # File /home/rsoares/java/tools/byteman-1.5.1/scripts/MyBMTests.btm line 6
      RULE JBossWeb Active Sessions info
      CLASS ^org.apache.catalina.session.ManagerBase
      METHOD add
      AT EXIT
      IF TRUE
      DO System.out.println("   ---> Active sessions for the webapp [" + $session.getSession().getServletContext().getContextPath() + "] is: " + $size);
      System.out.println("      ---> List of sessions' ID for this webapp is: " + $this.listSessionIds());
      System.out.println("      ---> The size of all active sessions for this webapp is: " + net.sourceforge.sizeof.SizeOf.humanReadable(net.sourceforge.sizeof.SizeOf.deepSizeOf($this.findSessions())))
      ENDRULE
      Transformed in:
      loader: BaseClassLoader@1eef0a8{vfsfile:/home/rsoares/opt/jboss-eap-5.1/jboss-as/server/web-tse/deploy/jbossweb.sar/}
      trigger class: org.apache.catalina.session.ManagerBase
      threw java.lang.Error: Failed to transform class org.apache.catalina.session.ManagerBase using rule JBossWeb Active Sessions info
      java.lang.Error: Failed to transform class org.apache.catalina.session.ManagerBase using rule JBossWeb Active Sessions info
      

       


      Whe I use the same rule starting the JVM process with the -javaagent cmd line it works fine. Any idea about this error?

       

      Thanks.