[jboss-user] [EJB3] - Bytecode transformation of an EJB results in a java.lang.VerifyError

simonboggild do-not-reply at jboss.com
Tue Dec 18 01:12:54 EST 2012

simonboggild [https://community.jboss.org/people/simonboggild] created the discussion

"Bytecode transformation of an EJB results in a java.lang.VerifyError"

To view the discussion, visit: https://community.jboss.org/message/783819#783819


I've previously posted on the Byteman forum in connection with not being able to use Byteman to transform an EJB. That post can be read here:  https://community.jboss.org/thread/215034?tstart=0 https://community.jboss.org/thread/215034?tstart=0
The pull for using Byteman in our setup is to have the ability to inject code appropriately during integration tests, to simulate different error scenarios when interacting with external systems.
We run our integration tests using Arquillian and have then tried to introduce Byteman as well. Using Byteman works well in our setup on regular POJO's, however, when trying to use Byteman to transform an EJB, we see the following exception being thrown from the application server when running the integration test (error thrown right after Byteman transforms the EJB):

SEVERE: 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)

Now, the theory of what goes wrong is (see Andrew Dinns answer in the post mentioned above), that the changes Byteman makes during its transformation of the EJB invaldiate some assumptions about the layout of the bytecode that the EJB code depends upon.
To take this matter further it's necessary to get some more insight in the nature of an EJB and what could be the reason why it's not possible to use a tool such as Byteman to do a bytecode transformation of the EJB without leaving it in an incosistent state.

Any insights/comments/solutions highly appreciated.



Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121218/5f02b723/attachment.html 

More information about the jboss-user mailing list