3 Replies Latest reply on Jan 20, 2014 3:15 PM by Johnathon Lee

    $@ help.

    Johnathon Lee Newbie

      Using rule [1] and verifying [2]... I'm thinking I'm ok.  But whenever I submit [3].  Am I just doing something wrong (using 2.1.3)?

       

      Thanks,

      JLee

       

      [1]

      RULE 3

      CLASS com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule

      METHOD xaRecovery

      AT INVOKE com.arjuna.ats.jta.utils.XAHelper.printXAErrorCode(javax.transaction.xa.XAException)

      BIND err:javax.transaction.xa.XAException = $@[1]

      IF TRUE

      DO traceStack("CAUGHT EXCEPTION\n");

      ENDRULE

       

      [2]

      [jolee@jolee bin]$ ./bytemancheck.sh -cp /home/jolee/jboss/jboss-eap-5.1.2/jboss-as/client/jbossjts.jar/home/jolee/ByteManGames/XAER_RMERR.btm Checking rule 3 against class com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule

      Parsed rule "3" for class com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule

      Type checked rule "3"

       

      TestScript: no errors

       

      [3]

      [jolee@jolee bin]$ ./bmsubmit.sh /home/jolee/ByteManGames/XAER_RMERR.btm redefine rule 3

      VerifyError during retransformation : some rules may not have been correctly injected or uninjected!

      java.lang.VerifyError

      at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)

      at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:124)

      at org.jboss.byteman.agent.Retransformer.installScript(Retransformer.java:136)

      at org.jboss.byteman.agent.TransformListener.handleScripts(TransformListener.java:337)

      at org.jboss.byteman.agent.TransformListener.loadScripts(TransformListener.java:260)

      at org.jboss.byteman.agent.TransformListener.handleConnection(TransformListener.java:213)

      at org.jboss.byteman.agent.TransformListener.run(TransformListener.java:146)

        • 1. Re: $@ help.
          Andrew Dinn Master

          Hi Jonathon,

           

          The rule looks fine to me and ought to just work (TM) so this looks very much like a problem with Byteman.

           

          Can you try with the 2.1.4 release. I just fixed a problem which was causing verify errors and, although I suspect it is not the cause here, I would like to rule out any possibility of that being the error.

           

          If that does not remove the error then I will see if I can reproduce the same result. Do you know if your app server isdoing anything special at transaction recovery time? e.g. loading dead transactions?

          • 2. Re: $@ help.
            Andrew Dinn Master

            Hi Johnathon,

             

            It would be a great help if you could provide me with a copy of the bytecode which is causing the verify error. Can you set the following system properties when you install the agent into JBoss eap

             

              -Dorg.jboss.byteman.dump.generated.classes

              -Dorg.jboss.byteman.dump.generated.classes.directory=$HOME/tmp/dump

              -Dorg.jboss.byteman.verbose

             

            n.b. you will need to create directory $HOME/tmp/dump

             

            If you are installing Byteman from the java command line using -javaagent then just add the above two defines to JAVA_OPTS. If you are using bminstall.sh then you can jsut add them to the command line in font of the process if argument.

             

            When your rule gets processed a copy fo the transformed bytecode should be written to file $HOME/tmp/dump/com/.../XARecoveryModule.class. If you execute

             

              $ javap -c -classpath $HOME/tmp/dump com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule > foo.txt

             

            this will decompile the bytecode for the transformed class. If you can post the output in foo.txt which relates to method xaRecovery (or just send me a copy of the whole file) I will see if I can work out how it has been transformed incorrectly.

            • 3. Re: $@ help.
              Johnathon Lee Newbie

              Andrew,

                Thanks!  I need to return to this,  but don't have the cycles right now...  so I appreciate the comments and I'll use them when I tackle it again.

               

              JLee