JMS message from JBoss AS7 to remote JBoss AS4 - java

I try to send TextMessage via JMS from JBoss 7 client on remote queue which is located on JBoss 4 server.
When server receive the message, exception is thrown:
2012-08-24 12:06:26,988 ERROR [ServerThread] Worker thread initialization failure
java.io.IOException: Can not read data for version 0. Supported versions: 1,2,22
at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:712)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:409)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:176)
So I added -Djboss.remoting.pre_2_0_compatible=true to jvm arguments but now I got another exception:
java.lang.IllegalArgumentException: Invalid packet type: 17
at org.jboss.jms.wireformat.PacketSupport.createPacket(PacketSupport.java:379)
at org.jboss.jms.wireformat.JMSWireFormat.read(JMSWireFormat.java:290)
at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:704)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:409)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:176)
Could anyone help me how to send message via JMS from JBoss 7 to JBoss 4 server?

Related

Error when trying to connect to IBM MQ in running in container in my test

I am trying to run a integration test in my spring boot application.
Test involved sending msg to IBM MQ (Running on local m/c in a container) and the asserting the that the listener get the msg.
My test fails with the error:
org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is 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.; nested exception is com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd64' was not found. For a client installation this is expected. [3=mqjbnd64]
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:311)
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:185)
Now I am running the IBM MQ as a container. So its not installed on my Windows.
Due to this setup, as suggested in other solutions I can't set the path for the library.
Any suggestion how to fix this.
Note: The application run without issue and connect to containerized IBM MQ and listen and read msg from the queue.

Proxy error while deploying Spring boot app on Jelastic

I am trying to deploy simple Spring Boot app on Jelastic. So I have created environment with Java 8, Postgres 9.5, Apache 2.4, deployed war-file and nothing works.
I receive the following error:
Proxy Error
The proxy server received an invalid response from an
upstream server. The proxy server could not handle the request GET
/localize/. Reason: Error reading from remote server
Apache/2.4.6 (CentOS) Server at node30... Port 80
It might be for the following reason: my server configurated on port 5555. However, I don't see any options that would tell Jelastic about the neccesary port.

IBM MQ v7.5 with JBOSS EAP 6.4 with JCA resource adapter and MDB throws 'xa_open' has failed with errorCode '-3'

I am using IBM MQ v7.5 with JBOSS EAP 6.4 with JCA resource adapter and MDB.
MQ server is running in HP NonStop Integrity Server v5.3.1.12
The application is working correctly. But I am seeing the following exception in my log
[com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMFAIL: javax.transaction.xa.XAException
at com.ibm.mq.connector.RecoveryXAResource.checkExceptions(RecoveryXAResource.java:147)
at com.ibm.mq.connector.RecoveryXAResource.recover(RecoveryXAResource.java:514)
at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:185)
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:541) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:181) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1] Caused by: com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment$1: MQJMS1068: failed to obtain XAResource.
at com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment.newException(ConfigEnvironment.java:379)
at com.ibm.msg.client.wmq.v6.jms.internal.MQXAConnection.createXASession(MQXAConnection.java:155)
at com.ibm.msg.client.jms.internal.JmsXAConnectionImpl.createXASession(JmsXAConnectionImpl.java:125)
at com.ibm.mq.jms.MQXAConnection.createXASession(MQXAConnection.java:88)
at com.ibm.mq.connector.RecoveryXAResource.recover(RecoveryXAResource.java:490)
... 5 more Caused by: javax.transaction.xa.XAException: The method 'xa_open' has failed with errorCode '-3'.
at com.ibm.mq.jmqi.JmqiXAResource.<init>(JmqiXAResource.java:274)
at com.ibm.mq.jmqi.JmqiXAResource.getInstance(JmqiXAResource.java:122)
at com.ibm.mq.jmqi.JmqiEnvironment.newJmqiXAResource(JmqiEnvironment.java:1598)
at com.ibm.msg.client.wmq.v6.base.internal.MQXAQueueManager.getXAResource(MQXAQueueManager.java:175)
at com.ibm.msg.client.wmq.v6.jms.internal.MQXAConnection.createXASession(MQXAConnection.java:134)
... 8 more
Can anyone help my understanding why this is happening?
Also, even if I stop my server, the connection to the MQ server was not killed. It remains as an orphan. Is it somehow related to this exception?
I am using NoTransaction in resource adapter configuration in standalone.xml
The XA error code -3 is XAER_RMERR - which means that a problem occurred with the resource manager, in this case MQ.
Have you looked at the queue manager's error logs?
I missed an important point in this question (due to lack of knowledge in IBM MQ).That is, my MQ server is running in HP NonStop Integrity Server. These servers doesn't support XA connection. Hence this error.
Now, the question is how to stop it.
I have stopped the periodic recovery in JBOSS with the following properties:
name="RecoveryEnvironmentBean.periodicRecoveryPeriod" value="0"
name="RecoveryEnvironmentBean.recoveryBackoffPeriod" value="0"
This is a known issue. IBM has issued fixpacks to address this issue. Please see:
http://www-01.ibm.com/support/docview.wss?uid=swg1IC97579
IBM MQ versions 7.5.0.4 and later have this fix.
And, yes, your orphaned connection is a result of this issue.

An error has occurred with the WebSphere MQ JMS connection

Getting below error with MQ(Message Queue), how to resolve this?
Message : com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ1107: A problem with
this connection has occurred. An error has occurred with the WebSphere MQ JMS
connection. Use the linked exception to determine the cause of this error.
Caused by [1] -->
Message : com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with
compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').
Caused by [3] -->
Message : com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9208: Error on receive
from host '/xx.xx.xx.xx:xxxx
(emb701t7.dci.bt.com)'. [1=-1,2=ffffffff,3=/xx.xx.xx.xx:xxxx
(emb701t7.dci.bt.com),4=TCP]
Please take me forward.
I faced the same error and its resolved now!
As Magic Wand mentioned in the comment, below error comes up if you have a lower version of MQ jar i.e if your MQ jar version is 7.0.1.5 or below
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9208: Error on receive from host
This bug has been fixed in IBM MQ version 7.0.1.6 or higher as mentioned here: http://www-01.ibm.com/support/docview.wss?uid=swg1IV00348
Add the newer version of below ibm.mq jars and make sure you have the additional jars too mentioned below:
com.ibm.mq.commonservices.jar
com.ibm.mq.jar
com.ibm.mq.jmqi.jar
com.ibm.mqbind.jar
com.ibm.mqjms.jar
fscontext.jar
jms-1.1-20020430.jar
providerutil.jar
The TCP connection between the MQ client running in weblogic and the MQ Queue Manager channel process is being broken unexpectedly (that is what the return code 2009 means). This could be down to a number of issues such as the queue manager being killed, the channel process exiting for some reason, a firewall killing the connection etc. Have a look on the MQ queue manager error logs for issues with the channel process at the same time. Take a note of how often the error message occurs i.e. is the first error 2 hours after the weblogic server starts.
You could take a network trace to see how the TCP connection is being closed and by who.

V5 Messaging Provider with ListenerPort

I configured a queue and a QueueConnectionFactory using the V5 Messaging provider in WebSphere Application Server 6.1.
I also have a ListenerPort configured for this destination.
It throws an exception when I try to connect to this queue using the queue connection factory or when the Message Listener listening to this ListenerPort starts up.
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager
for 'localhost:WAS_Node01_server1'
and the nested exception is
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
Can someone please point me to what possibily could have gone wrong in configuring the queue and queue connection factory?
The error indicates that the WebSphere MQ transport is being used. Per the clarification in your comments, no queue manager is present so a 2059 is expected. It will be necessary to configure a WAS messaging Engine to provide the native transport or to point to a queue manager.

Categories