Discussion:
[jboss-user] [Beginner's Corner] - MQ Howto?
Thinus Pollard
2012-11-19 09:31:46 UTC
Permalink
Thinus Pollard [https://community.jboss.org/people/thinusp] created the discussion

"MQ Howto?"

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

--------------------------------------------------------------
Hi All

Pretty new to the whole JBoss thing.

I am looking for a Howto or something on getting MQ and Message Driven Beans to play nice. I've installed MQ (7.1.0-2) and latest nightly build of JBoss 7.2. (there is a bug in 7.1.1 where MDB's where not activated when a message is placed on a Queue).

I've deployed the resource adapter and it seems to deploy sucessfully. My MDB has an activation config via annotations. Upon deployment of the EAR project I get a RemoteFAP<init> NoSuchMethodException referring to the constructor for the RemoteFAP class. I have inspected the jar file (JMQI MQ jar file) and the constructor is definitly there.

So my initial questions are:
* Is there a step by step tutorial somewhere that shows how to get MQ working with JBoss for the above mentioned versions?
* Failing that, which MQ jars should be included in my EAR? (currently I have the com.ibm.mq, jmqi and jms jars included at this point in time).

Currently I have no idea where the issues may be hiding (is it MQ or the fact that I'm trying to use the nightly JBoss build). Any pointers would be appreciated.

Thinus
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/777123#777123]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Thinus Pollard
2012-12-03 06:52:19 UTC
Permalink
Thinus Pollard [https://community.jboss.org/people/thinusp] created the discussion

"Re: MQ Howto?"

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

--------------------------------------------------------------
Hi everyone

I am still stuck with this issue. MQ 7.1 patched to .02 and atill getting the NoSuchMethodException on the constructor of RemoteFAP. The full exception:

08:03:07,173 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 121) MSC00001: Failed to start service jboss.deployment.subunit."CRMEAR.ear"."CRM.jar".component.AccountPublishMDB.START: org.jboss.msc.service.StartException in service jboss.deployment.subunit."CRMEAR.ear"."CRM.jar".component.AccountPublishMDB.START: java.lang.RuntimeException: com.ibm.mq.connector.DetailedResourceAdapterInternalException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
          at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_09]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_09]
          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_09]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
          at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: com.ibm.mq.connector.DetailedResourceAdapterInternalException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
          at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:177)
          at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
          ... 7 more
Caused by: com.ibm.mq.connector.DetailedResourceAdapterInternalException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
          at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:129)
          at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
          at com.ibm.mq.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:299)
          at com.ibm.mq.connector.inbound.MessageEndpointDeployment.acquireConnection(MessageEndpointDeployment.java:270)
          at com.ibm.mq.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:222)
          at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:397)
          at org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:164)
          at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:175)
          ... 8 more
Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem.
See the linked exception for further information.
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_09]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_09]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_09]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_09]
          at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:314)
          at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:228)
          at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6759)
          at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6151)
          at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:280)
          at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6143)
          at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6199)
          at com.ibm.mq.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:205)
          ... 13 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodException[com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)],3=Class.getConstructor0]
          at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:795)
          at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:651)
          at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6751)
          ... 18 more
Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)
          at java.lang.Class.getConstructor0(Class.java:2721) [rt.jar:1.7.0_09]
          at java.lang.Class.getConstructor(Class.java:1674) [rt.jar:1.7.0_09]
          at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:713)
          ... 20 more

This is driving me crazy, what am I missing here? When I browse the RemoteFAP class using eclipse the constructor is there, and it takes the proper arguments. It doesn't look like there is more than one RemoteFAP class on my classpath.

Kind regards
Thinus
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/779523#779523]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Vladimir Rastseluev
2013-05-24 09:15:08 UTC
Permalink
Vladimir Rastseluev [https://community.jboss.org/people/vrastsel] created the discussion

"Re: MQ Howto?"

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

--------------------------------------------------------------
Hi, did you resolve this issue? I have the same problem now.
Regards, Vladimir
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/819289#819289]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Vladimir Rastseluev
2013-05-30 14:18:27 UTC
Permalink
Vladimir Rastseluev [https://community.jboss.org/people/vrastsel] created the discussion

"Re: MQ Howto?"

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

--------------------------------------------------------------
Resolved. There was a classloading problem. A MDB, packed in .ear, need to have explicit dependency on deployed .rar archive.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820430#820430]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Loading...