0

I am referring the below link to connect IBM MQ using Spring MDP/Activation Spec.

Spring JMS and Websphere MQ

As I run in standalone maven application, I am getting the below error. Please help me to resolve this issue.

MQJCA1006: An incorrect version of the JCA classes was found. Deployment failed. The JCA classes were found in the class path but were not the correct version. This error can occur if the application server finds connector.jar in the class path. This JAR file is required by WebSphere MQ classes for JMS in a J2SE environment, but is not required in a J2EE 1.4 environment.

pom.xml:

<properties>
    <ibmmq.version>7.0.1.0</ibmmq.version>
    <spring.version>3.2.12.RELEASE</spring.version>
</properties>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>${spring.version}</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jms</artifactId>
    <version>${spring.version}</version>
</dependency>
<!-- other spring dependencies -->

<!-- other spring dependencies -->
<dependency>
    <groupId>com.ibm</groupId>
    <artifactId>com.ibm.mqjms</artifactId>
    <version>${ibmmq.version}</version>
</dependency>
<dependency>
    <groupId>com.ibm</groupId>
    <artifactId>connector</artifactId>
    <version>${ibmmq.version}</version>
</dependency>
<!-- other MQ dependencies -->

<dependency>
    <groupId>javax.resource</groupId>
    <artifactId>connector-api</artifactId>
    <version>1.5</version>
</dependency>

Exception:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myResourceAdapterBean' defined in class path resource [spring/common-jms-context.xml]: Invocation of init method failed; nested exception is com.ibm.mq.connector.DetailedResourceAdapterInternalException: MQJCA1006: An incorrect version of the JCA classes was found. Deployment failed. The JCA classes were found in the class path but were not the correct version. This error can occur if the application server finds connector.jar in the class path. This JAR file is required by WebSphere MQ classes for JMS in a J2SE environment, but is not required in a J2EE 1.4 environment.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
user1346346
  • 195
  • 2
  • 16
  • I think this tells you the reason `This error can occur if the application server finds connector.jar in the class path. This JAR file is required by WebSphere MQ classes for JMS in a J2SE environment, but is not required in a J2EE 1.4 environment.`. – JoshMc Mar 03 '17 at 19:20
  • Also note that MQ v7.0.1.0 was released September 25th 2009 and went out of support from IBM September 30th 2015. I would recommend you look at the MQ v8.0.0.6 standalone Java install. Go to [Fix Central](https://www-945.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm~WebSphere&product=ibm/WebSphere/WebSphere+MQ&release=8.0.0.6&platform=All&function=all&useReleaseAsTarget=true) and type `Java-All` in the Search box right above the results. – JoshMc Mar 03 '17 at 20:01
  • This question had been edited and moved to the top of the Active list and I did not notice it was from last year. If you are still having a problem please update it. If you solved it please post a answer to your own question with the details of the solution. – JoshMc Mar 03 '17 at 22:07

0 Answers0