Jakarta bytecode instrumentation

45 views
Skip to first unread message

Thorsten Goetzke

unread,
Jan 13, 2022, 10:27:06 AM1/13/22
to WildFly
Hello,

As mentioned by brian here https://groups.google.com/g/wildfly/c/zh2ZllHQtKo/m/kIYLXMK4BAAJ wildfly seems to ship with a bytecode instrumentation to migrate ee  to the jakarta namespace.
I run into the problem that this instrumentation does a bit too much for our legacy application. Are there some options to disable the instrumentation for deployments or alltogether? 


James Perkins

unread,
Jan 13, 2022, 10:42:56 AM1/13/22
to WildFly
What version of WildFly Preview are you using?

Thorsten Goetzke

unread,
Jan 13, 2022, 10:47:24 AM1/13/22
to WildFly

To give a litte more context: I have a module a which contains "activemq classic" as a ressource.
Then there is a deployment b that uses activemq (it depends on module a)

What happens is that the activemq library is available using the "old" ee namespace/ not the jakarta namespace.
However our own code in Deployment B gets somehow transformed by wildfly to require the jakarta namespace, even though the provided java class file uses the javax.jms namespace.

Results in a NoSuchMethod error, since now our transformed code requests the jakarta namespace from an untransformed activemq classic (which it doesn't have)
I am a bit lost on why that happens..

Thorsten Goetzke

unread,
Jan 13, 2022, 10:47:59 AM1/13/22
to WildFly

wildfly-preview-26.0.0.Beta

rop...@redhat.com

unread,
Jan 13, 2022, 3:14:07 PM1/13/22
to WildFly
You shouldn't mix javax & jakarta namespaces in your environment.
I'd recommend to create jakarta compatible module of "activemq classis".
You can use Batavia command line tool to create such jar from original jar.

Brian Stansberry

unread,
Jan 13, 2022, 5:47:19 PM1/13/22
to WildFly
WildFly Preview's transformation of deployments can be disabled by adding the following system property to the server launch:

-Dorg.wildfly.unsupported.skip.jakarta.transformer=true

Thorsten Goetzke

unread,
Jan 14, 2022, 2:57:46 AM1/14/22
to WildFly

Many thanks, after adding -Dorg.wildfly.unsupported.skip.jakarta.transformer=true I no longer get NoSuchMethodError
Reply all
Reply to author
Forward
0 new messages