I've a JMS configuration for Weblogic which include: A Server (which is running fine), a JMS Server (addressed by my Server) and a JMS Module. The JMS Server is not displaying an "OK" health state but no exception was found on logs and my JMS module (which contains some queues) is not displaying any JMS destination, also, no errors on logs. Any idea/clue?
Weblogic 12.2.1.0.0 has a bug (Bug 22481818) affecting JMS module. So, in order to fix it you need to apply a patch: 21830665.
Related
I have Spring Boot application which listen IBM MQ Queue via #JmsListener annotation as below from component class. The MQ properties (hostname, channel, port, etc) are set from yaml file.
#JmsListener(destination = "<QueueName>")
public void receiveMessage(BytesMessage msg) {
//snippet to read msg
}
The MQ dependencies are added in gradle build as below,
compile("com.ibm.mq:mq-jms-spring-boot-starter:0.0.2") {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
This works fine and listening the message as long as I run the application on local with Tomcat container. But if I package this as EAR and deploy to Wesbphere8.5 server, it throws below exception and listener is not reading the message from queue. I confirmed that all the run-time dependencies are packaged in EAR. Tried with different versions of MQ dependencies but no luck.
2018-07-10 15:21:16,531 ERROR DefaultMessageListenerContainer - Could not refresh JMS Connection for destination 'QueueName' -
retrying using FixedBackOff{interval=5000, currentAttempts=34,
maxAttempts=unlimited}. Cause: JMSFMQ6312: An exception occurred in
the Java(tm) MQI.; nested exception is com.ibm.mq.jmqi.JmqiException:
CC=2;RC=2195;AMQ9546: Error return code received.
[1=java.lang.reflect.InvocationTargetException[null],3=NativeConstructorAccessorImpl.newInstance0]
Need help to fix this issue.
I faced a similar issue like this. This happens because of missing configurations on IBM MQ Connection with your JMS Application. In My case, I got an authorization related exception but I set the correct user credentials for the IBM mq. when I checked the IBM mq site, the userName is different and that is not which I configured in my spring application.
#IBM MQ JMS Configuration
ibm.mq.queueManager={QUEUE_MANAGER}
ibm.mq.channel={CHANNEL_NAME}
ibm.mq.connName={HOST_NAME(HOST_PORT)}
ibm.mq.user={USER_NAME}
ibm.mq.password={PASSWORD}
Then I added the below property to Use compatibility mode when authenticating with a queue manager.
Here we override the authentication mode. This should not normally be needed with current maintenance levels of MQ V8 or V9, but some earlier levels sometimes got get it wrong and then this flag can be set to "false"
ibm.mq.user-authentication-m-q-c-s-p=false
Please Refer this page for more details
Currently I have setup two queues on WebSphere 7. One for sending and one for recieving messages.
I have configured a activation spec on the receiving queue and the messages are consumed fine by a Message Bean.
Also I have written a client that can run on a separate jvm which can send messages fine to the queue.
I am sure that the queues work.
Now I want to know how can I connect them with WebMetods. I know that WebMethods supports JBoss and WebLogic but no support for WebSphere.
I should be able to get this working just by providing:
a provider url - "iiop://172.17.13.65:2809"
a connection factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue"
and an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"
(at least this is what my client is using)
Is there anybody that has resolved this issue? And what are the steps they took?
Thank you in advance for your help.
We were able to get this implementation happen.
To solve this Web Methods had to import some jar files for Client JMS:
com.ibm.ws.ejb.thinclient_7.0.0 + com.ibm.ws.orb_7.0.0 + com.ibm.ws.sib.client.thin.jms_7.0.0
And use a bootstrap of this type PROVIDER_URL: "iiop://natasha:2810"
Alaso these details as previously mentioned:
a factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue" and
an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"
I'm testing a WebLogic MDB (running on my local Windows dev environment - Eclipse/WebLogic 10.3.2) with WebSphere MQ 6.0.1.0 (running on a Linux server). The WebSphere MQ components have been previously configured and I have the correct .bindings file.
I have followed the instructions described here.
I have no problem consuming messages that are placed on the MQ queue. However, when I attempt to configure the MDB to put messages back to the MQ queue I get the following warning upon server start-up:
<Warning> <JMSPool> <BEA-169808> <There was an error while making the initial
connection to the JMS resource named jms/WLSenderQCF from the EJB "TestMDB"
inside application "EJB Test 2EAR". The server will attempt the connection
again later. The error was javax.jms.JMSException: MQJMS1068: failed to obtain
XAResource>
If I place a message on the queue, my MDB consumes the messages, but these exceptions are thrown when the MDB attempts to put the message to the MQ Queue:
javax.jms.JMSException: MQJMS1068: failed to obtain XAResource...
javax.transaction.xa.XAException: client connection not XA enabled...
java.lang.NullPointerException
Anyone run into this and knows what the problem is?
Thanks for any help.
One issue seems to be the version of MQ you're using. It is ancient. IBM took MQ 6 out of support quite a while ago (Sept '12! http://www-01.ibm.com/support/docview.wss?uid=swg21584325).
Things got a lot easier when IBM decided to include the extended transactional client in the product for free: http://www-01.ibm.com/support/docview.wss?uid=swg21584325
So one option might be to upgrade to a version which includes this out of the box:
7.0.1.12+
7.1.0.5+
7.5
8.0
Otherwise... look into the v6 documentation on how to enable the 'extended transactional client' for JMS assuming you paid for it.
I am trying to configure clustered JMS on Weblogic 10.3.4.
I have a 4 node cluster plus my AdminServer already configured. I also have my JMS already configured and targeted to AdminServer. From reading the Weblogic documentation, I am not clear as how to cluster the JMS server. Could someone please explain how?
There is no 'clustered JMS server'. There are WebLogic clusters, the Admin Server & Managed Servers and then JMS Servers. JMS Servers are a configuration construct within a Managed Server.
In order to cluster JMS in WebLogic each managed server in the cluster needs a JMS server. Then, when you create JMS resources you can either use default targeting or subdeployments. If you use default targeting then it will implicitly target the resource to the JMS server for each managed server in the cluster. If you have more than one JMS server per managed server, the behavior can be different, but you likely don't need that. Alternatively, you can use subdeployments to target specific managed servers or JMS servers, but not likely needed for your purposes.
Currently I am working on a JMS application. But I use plain JMS API and Property file for configurations. My application is running in Weblogic and connects to MQ series server of my client.
Recently I got to know I can use Weblogic for JMS configurations.
Please explain.
What is "Foreign JMS provider"?
Is Weblogic also a JMS server or Foreign JMS provider or Both?
Weblogic provides the JMS Server features fully compliant with all JMS spec elements such as ConnectionFactory and Destinations. On this JMS Server you can connect and send messages to the client's Messaging Server via a configured Destination.
In addition using Weblogic as the JMS Server gives you lot many features such as Message Retry in case of failure, setting message quotas as well as enhanced monitoring of the JMS Server to track errors. The idea is to have more configuration driven settings for performance, deadlocks, tuning, filestore or database store etc.
A full list of such features is given at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms/fund.html#wp1071787
A Foreign JMS Provider in Weblogic is the term used to define JMS implementations other than Weblogic JMS. An example is IBM MQ in your case.
Once the Foreign Provider is configured within Weblogic, for all practical purposes within the code - it can be called as if it was on local JNDI lookup. Weblogic will make the remote calls transparent to your code. This allows you to change your destination via configuration on the Weblogic console.
You will need a Messaging Bridge within Weblogic JMS Server to connect a source destination from which messages are received, and a target destination to which messages are sent.
Some essential reading on this is at: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms_admin/advance_config.html#wp1075917
and an example of configuring IBM MQ as a Foreign Provider is at http://www.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html#N1011D