I'm upgrading an OpenLiberty application to Jakarta EE 9.1 that integrates with IBM MQ using it's JMS resource adapter.
Resource adapter is declared in the server.xml
like this:
<resourceAdapter id="wmqjmsra" location="${server.config.dir}/wmq.jmsra.rar" />
This error blows up when the server starts:
[INFO] [ERROR] J2CA7002E: An exception occurred while installing the resource adapter wmqjmsra.
The exception message is: java.lang.NoClassDefFoundError: javax/resource/spi/ResourceAdapter
As I mentioned I'm using Jakarta EE 9.1, so it is expected that class javax.resource.spi.ResourceAdapter
will not be available since it has been renamed to import jakarta.resource.spi.ResourceAdapter
following the new standard.
My pom.xml
dependencyes:
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>9.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
The IBM MQ Resource Adapter documentation doesn't mention support for Jakarta EE, yet it is supported in IBM Liberty.
So what would be a possible fix for this?
I'm using the latest IBM MQ Resource Adapter version 9.2.5.0, downloaded using these instructions, and running the latest OpenLiberty build 22.0.0.4 and JDK 17.
MQ does not yet ship a JMS3/Jakarta implementation. Version 9.3 has just been announced for availability in June and one of the features there is expected to be a JMS3 variant.
The current RA says it is supported in "any JavaEE 7.0 compliant version of IBM WebSphere Application Server Liberty." Which obviously excludes the Jakarta EE systems for now.