Author |
Message
|
Olel |
Posted: Fri Jul 07, 2006 4:38 am Post subject: Exception about 'non-local' queue in non-ASF mode |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
Hello,
at first I'd like to say "Hi", because I'm new to this forum and this is my first post.
And here's my problem:
We are using Websphere MQ 5.3 CSD11 and Websphere Application Server 5.0.2.4.
In MQ we have defined several QueueManagers (QM) with several Queues in each of it.
Since it is very important that the messages in one of the queues are received in the right order (as they are prioritized by the sender) we use the non-ASF mode by setting the property NON.ASF.RECEIVE.TIMEOUT to 10000.
After restarting the application server I get several errors when the MDBs are created, which say "MQJMS1017: Non-local MQ queue not valid for receiving or browsing".
Thereby it is interesting that only those queues produce errors which are used by our oracle messaging gateway. (For those who don't know the oracle messaging gateway: in few words it is a service on the oracle database which sends a message at a queue when the data of a determinable table is modified.)
Moreover I can say that everything works fine in my development environment, but not in the integration environment where I get these exceptions.
The only difference between these environments is that we use the internal WAS from the WSAD without any security in our development environment and a "real" WAS in a cluster with security against LDAP in the integration environment.
For any pieces of advice I would be very grateful.
Ole |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 07, 2006 11:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Welcome to the <real> world.
a) You cannot receive (or get) a message from a queue that is not defined as a "Queue Local" to the queue manager you are connecting to.
This restriction does not apply for sending (or putting) messages .
You need to give us more details about the set up and the error messages received especially the reason code.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Olel |
Posted: Mon Jul 10, 2006 5:07 am Post subject: |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
fjb_saper wrote: |
You cannot receive (or get) a message from a queue that is not defined as a "Queue Local" to the queue manager you are connecting to.
This restriction does not apply for sending (or putting) messages. |
Ok, I understand that one. But, and I forgot to mention that in my first post, everything works fine (also in the integration environment) if we don't use the non-ASF mode. Therefore we thought that it could not be a problem with the queue being local or not.
Nonetheless I had a second look at the queue configuration and here is what I found out.
In Websphere MQ we have defined some Queue Managers. One is "MyQueueManager1" which is local (right click on the manager -> Properties -> Tab Common -> local/remote Queue: local)
On this Queue Manager we have defined 5 Queues which are also local (right click on the queues -> Properties -> Tab Common -> Type: local, Description: "WebSphere MQ Default Local Queue")
Therefore the configuration seems to be correct to me. Or am I missing something? Is there another parameter to check for ensuring the queues to be "Queue Local"?
fjb_saper wrote: |
You need to give us more details about the set up and the error messages received especially the reason code. |
When starting the application server I get the following exceptions while the server is trying to start the EJB-JARs:
J2CA0056I: The Connection Manager received a fatal connection error
from the Resource Adaptor for resource JMS$My1stConnectionFactory$JMSManagedConnection@1876610320. The exception which was received is: javax.jms.JMSException: MQJMS1017: Non-local MQ queue not valid for receiving or browsing.
J2CA0056I: The Connection Manager received a fatal connection error
from the Resource Adaptor for resource JMS$My1stConnectionFactory empfangen. exception which was received is: javax.jms.JMSException: MQJMS1017: Non-local MQ queue not valid for receiving or browsing.
We get these two exceptions five times (once for each of our five MDBs that are connected to the five Queues on the QueueManager "MyQueueManager1".
After that I get the following exceptions:
[10.07.06 13:30:03:234 CEST] 6c6d8d6a ServerSession W WMSG0031E: Exception processing JMS Message for MDB My1stMDB, JMSDestination jms/My1StQueue: javax.jms.JMSException: MQJMS1017: Non-local MQ queue not valid for receiving or browsing
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:553)
at com.ibm.mq.jms.MQSession.createQReceiver(MQSession.java:5838)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:310)
at com.ibm.ejs.jms.JMSQueueReceiverHandle.<init>(JMSQueueReceiverHandle.java:137)
at com.ibm.ejs.jms.JMSQueueSessionHandle.createReceiver(JMSQueueSessionHandle.java:189)
at com.ibm.ejs.jms.listener.ServerSession.contact admin(ServerSession.java:602)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:480)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[10.07.06 13:30:03:624 CEST] 13a7cd10 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "onMessage" on bean (MyEAR#MyProject.jar#MyMDBClass, null)". (1) Exception data: java.lang.reflect.InvocationTargetException: javax.jms.JMSException: MQJMS1017: Non-local MQ queue not valid for receiving or browsing
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:553)
at com.ibm.mq.jms.MQSession.createQReceiver(MQSession.java:5838)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:310)
at com.ibm.ejs.jms.JMSQueueReceiverHandle.<init>(JMSQueueReceiverHandle.java:137)
at com.ibm.ejs.jms.JMSQueueSessionHandle.createReceiver(JMSQueueSessionHandle.java:189)
at com.ibm.ejs.jms.listener.ServerSession.contact admin(ServerSession.java:602)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:480)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
for every MDB that listens on a queue which is defined on the Queue Manager with the QueueConnectionFactory "My1stConnectionFactory".
(1) Attention: Because we use the gernan version of Websphere MQ I've translated all exceptions in english for your understanding. When I've tried to translate the exception with the code 'CNTR0020E' I found the following english text:
"The following exception occurs during a heavy load on a message-driven bean (MDB)." (Source: http://www-1.ibm.com/support/docview.wss?uid=swg21166805).
Moreover I should mention that the QueueConnectionFactory (QCF) "My1stConnectionFactory" is the one that the orcale messaging gateway is using. All the other QCFs with all the other Queues defined on them encounters no difficulties although there are a few more MDBs connecting to them.
Therefore the problem seems to deal with the combination of the oracle messaging gateway and the activated security in the integration environment (we use the oracle messaging gateway in the development environment, but no security).
Thanks for patience while reading the whole stuff and even more thanks for any pieces of advice.
Ole |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 10, 2006 12:29 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you provide the JNDI setup for :
a) QCF JMS$My1stConnectionFactory$JMSManagedConnection@1876610320
b) destinations used by MDBs
We use Oracle Messenging Gateway. However on the outbound leg all messages go to remote queues as they are transferred to other qmgrs.
Thanks _________________ MQ & Broker admin |
|
Back to top |
|
 |
Olel |
Posted: Tue Jul 11, 2006 5:32 am Post subject: |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
fjb_saper wrote: |
Can you provide the JNDI setup for :
a) QCF JMS$My1stConnectionFactory$JMSManagedConnection@1876610320
b) destinations used by MDBs |
I am not really sure whether I've found what you're looking for, but I've tried my best . I've found the files "resources.xml" and "server.xml" which seem to include the jndi setup.
He are the relevant pieces from the content:
resources.xml
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:resources.j2c="http://www.ibm.com/websphere/appserver/schemas/5.0/resources.j2c.xmi" xmlns:resources.jms="http://www.ibm.com/websphere/appserver/schemas/5.0/resources.jms.xmi" xmlns:resources.jms.mqseries="http://www.ibm.com/websphere/appserver/schemas/5.0/resources.jms.mqseries.xmi" xmlns:resources.mail="http://www.ibm.com/websphere/appserver/schemas/5.0/resources.mail.xmi" xmlns:resources.url="http://www.ibm.com/websphere/appserver/schemas/5.0/resources.url.xmi">
<resources.jms:JMSProvider xmi:id="builtin_jmsprovider" name="WebSphere JMS Provider" description="Built-in WebSphere JMS Provider" externalInitialContextFactory="" externalProviderURL=""/>
<resources.jms:JMSProvider xmi:id="builtin_mqprovider" name="WebSphere MQ JMS Provider" description="WebSphere MQ JMS Provider" externalInitialContextFactory="" externalProviderURL="">
<classpath>${MQJMS_LIB_ROOT}</classpath>
<nativepath>${MQJMS_LIB_ROOT}</nativepath>
<factories xmi:type="resources.jms.mqseries:MQQueueConnectionFactory" xmi:id="MQQueueConnectionFactory_1119366602593" name="My1stConnectionFactory" jndiName="jms/CF1" description="" authMechanismPreference="BASIC_PASSWORD" XAEnabled="true" queueManager="MyQueueManager1" host="myserver" port="1415" transportType="CLIENT" clientID="Me1" msgRetention="true">
<connectionPool xmi:id="ConnectionPool_1119366603171"/>
<mapping xmi:id="MappingModule_1131470967883" mappingConfigAlias="DefaultPrincipalMapping" authDataAlias=""/>
<sessionPool xmi:id="ConnectionPool_1119366603749"/>
</factories>
<factories xmi:type="resources.jms.mqseries:MQQueueConnectionFactory" xmi:id="MQQueueConnectionFactory_1119366606296" name="My2ndConnectionFactory" jndiName="jms/CF2" description="" authMechanismPreference="BASIC_PASSWORD" XAEnabled="true" queueManager="MyQueueManager1" host="myserver" port="1415" transportType="CLIENT" clientID="Me2" msgRetention="true">
<connectionPool xmi:id="ConnectionPool_1119366606859"/>
<mapping xmi:id="MappingModule_1131470968930" mappingConfigAlias="DefaultPrincipalMapping" authDataAlias=""/>
<sessionPool xmi:id="ConnectionPool_1119366607406"/>
</factories>
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1119366636390" name="MyQueue1" jndiName="jms/MyQueue1" description="" persistence="PERSISTENT" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="UNLIMITED" specifiedExpiry="0" baseQueueName="MyQueue1" baseQueueManagerName="MyQueueManager1" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerHost="" queueManagerPort="0"/>
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1119366637327" name="MyQueue2" jndiName="jms/MyQueue2" description="" persistence="PERSISTENT" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="UNLIMITED" specifiedExpiry="0" baseQueueName="MyQueue2" baseQueueManagerName="MyQueueManager1" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerHost="" queueManagerPort="0"/>
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1119366638202" name="MyQueue3" jndiName="jms/MyQueue3" description="" persistence="PERSISTENT" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="UNLIMITED" specifiedExpiry="0" baseQueueName="MyQueue3" baseQueueManagerName="MyQueueManager1" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerHost="" queueManagerPort="0"/>
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1119366639202" name="MyQueue4" jndiName="jms/MyQueue4" description="" persistence="PERSISTENT" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="UNLIMITED" specifiedExpiry="0" baseQueueName="MyQueue4" baseQueueManagerName="MyQueueManager1" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerHost="" queueManagerPort="0"/>
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1119366641952" name="MyQueue5" jndiName="jms/MyQueue5" description="" persistence="PERSISTENT" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="UNLIMITED" specifiedExpiry="0" baseQueueName="MyQueue5" baseQueueManagerName="MyQueueManager1" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerHost="" queueManagerPort="0"/>
</resources.jms:JMSProvider>
<resources.j2c:J2CResourceAdapter xmi:id="builtin_rra" name="WebSphere Relational Resource Adapter" description="Built-in Relational Resource Adapter for Container Managed Persistence" archivePath="${WAS_LIBS_DIR}/rsadapter.rar">
<propertySet xmi:id="J2EEResourcePropertySet_8">
<resourceProperties xmi:id="J2EEResourceProperty_31" name="TransactionResourceRegistration" type="java.lang.String" value="dynamic" description="Type of transaction resource registration (enlistment). Valid values are either "static" (immediate) or "dynamic" (deferred)."/>
<resourceProperties xmi:id="J2EEResourceProperty_32" name="InactiveConnectionSupport" type="java.lang.Boolean" value="true" description="Specify whether connection handles support implicit reactivation. (Smart Handle support). Value may be "true" or "false"."/>
</propertySet>
</resources.j2c:J2CResourceAdapter>
</xmi:XMI>
|
As you can see, there to ConnectionFactories for the same QueueManager whereas the second one isn't used.
server.xml
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<process:Server xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:adminservice="http://www.ibm.com/websphere/appserver/schemas/5.0/adminservice.xmi" xmlns:applicationserver="http://www.ibm.com/websphere/appserver/schemas/5.0/applicationserver.xmi" xmlns:applicationserver.ejbcontainer="http://www.ibm.com/websphere/appserver/schemas/5.0/applicationserver.ejbcontainer.xmi" xmlns:applicationserver.ejbcontainer.messagelistener="http://www.ibm.com/websphere/appserver/schemas/5.0/applicationserver.ejbcontainer.messagelistener.xmi" xmlns:applicationserver.webcontainer="http://www.ibm.com/websphere/appserver/schemas/5.0/applicationserver.webcontainer.xmi" xmlns:debugservice="http://www.ibm.com/websphere/appserver/schemas/5.0/debugservice.xmi" xmlns:loggingservice.ras="http://www.ibm.com/websphere/appserver/schemas/5.0/loggingservice.ras.xmi" xmlns:namingserver="http://www.ibm.com/websphere/appserver/schemas/5.0/namingserver.xmi" xmlns:orb="http://www.ibm.com/websphere/appserver/schemas/5.0/orb.xmi" xmlns:pmiservice="http://www.ibm.com/websphere/appserver/schemas/5.0/pmiservice.xmi" xmlns:process="http://www.ibm.com/websphere/appserver/schemas/5.0/process.xmi" xmlns:processexec="http://www.ibm.com/websphere/appserver/schemas/5.0/processexec.xmi" xmlns:traceservice="http://www.ibm.com/websphere/appserver/schemas/5.0/traceservice.xmi" xmi:id="Server_1" name="c1" clusterName="mycluster">
<components xmi:type="applicationserver.ejbcontainer:EJBContainer" xmi:id="EJBContainer_1" passivationDirectory="${USER_INSTALL_ROOT}/temp" inactivePoolCleanupInterval="30000">
<stateManagement xmi:id="StateManageable_10" initialState="START"/>
<services xmi:type="applicationserver.ejbcontainer.messagelistener:MessageListenerService" xmi:id="MessageListenerService_1">
<properties xmi:id="Property_1152194151668" name="NON.ASF.RECEIVE.TIMEOUT" value="10000" required="false"/>
<listenerPorts xmi:id="ListenerPort_1119366253280" name="MyListener1" connectionFactoryJNDIName="jms/CF1" destinationJNDIName="jms/MyQueue1" maxSessions="1" maxRetries="10">
<stateManagement xmi:id="StateManageable_1131471029476" initialState="START"/>
</listenerPorts>
<listenerPorts xmi:id="ListenerPort_1119366253749" name="MyListener2" connectionFactoryJNDIName="jms/CF1" destinationJNDIName="jms/MyQueue2" maxSessions="1" maxRetries="10">
<stateManagement xmi:id="StateManageable_1131471031023" initialState="START"/>
</listenerPorts>
<listenerPorts xmi:id="ListenerPort_1119366254734" name="MyListener3" connectionFactoryJNDIName="jms/CF1" destinationJNDIName="jms/MyQueue3" maxSessions="1" maxRetries="10">
<stateManagement xmi:id="StateManageable_1131471033929" initialState="START"/>
</listenerPorts>
<listenerPorts xmi:id="ListenerPort_1119366255265" name="MyListener4" connectionFactoryJNDIName="jms/CF1" destinationJNDIName="jms/MyQueue4" maxSessions="1" maxRetries="10" maxMessages="1">
<stateManagement xmi:id="StateManageable_1131471035757" initialState="START"/>
</listenerPorts>
<listenerPorts xmi:id="ListenerPort_1119366255984" name="MyListener5" connectionFactoryJNDIName="jms/CF1" destinationJNDIName="jms/MyQueue5" maxSessions="1" maxRetries="10" maxMessages="1">
<stateManagement xmi:id="StateManageable_1131471036944" initialState="START"/>
</listenerPorts>
<threadPool xmi:id="ThreadPool_3" minimumSize="10" maximumSize="50" inactivityTimeout="3500" isGrowable="false"/>
</services>
</components>
</process:Server>
|
I hope these information will help you. If you need other information or more details please ask me for them, best with a short description where to find them.
Thanks!
Ole |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jul 11, 2006 2:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This looks bizzarre.
Can you please do the following:
Write a little snippet of code that gets invoked on the server when you request a specific url...
There you retrieve the qcf from JNDI, retrieve the queue from JNDI.
Display QCF name and accessible attributes.
Display Queue name and accessible attributes.
Try and create a connection /session. Create a receiver for the queue.
Can you receive?
Close the receiver, session, connection.
Remember if there is an exception at any moment we will need to get the LinkedException and the reason code.
What I suspect is that you might not have all the right jars on the class path because your resource.xml file looks fine to me.
Enjoy
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
Olel |
Posted: Sun Jul 16, 2006 10:55 pm Post subject: |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
Quote: |
This looks bizzarre. |
This is bizarre!
I just want to give you a quick update on our problem. We have done a reinstalling of our Application Server and the WebShere MQ Server and give it a second try ... and it works!
So, we don't know what the problem was, but sometimes one should not think about problems that aren't ones any longes. Especially in computer science...
Thanks for your help!
Ole |
|
Back to top |
|
 |
Anirud |
Posted: Thu Jul 20, 2006 9:03 pm Post subject: |
|
|
 Master
Joined: 12 Feb 2004 Posts: 285 Location: Vermont
|
Hi Ole,
Is the 10000 milliseconds timeout working?
We set the NON.ASF.RECEIVE.TIMEOUT value to 10000 milliseconds. Recycled the App Server. We ran an API Trace on the queue and it still shows the wait interval as 5000 milliseconds. Do I have to change anything else to get NON.ASF.RECEIVE.TIMEOUT into effect?
I read the manuals on NON.ASF.RECEIVE.TIMEOUT, but not much help.
If any one has any idea about it, please let me know.
Thanks. |
|
Back to top |
|
 |
Olel |
Posted: Thu Jul 20, 2006 9:40 pm Post subject: |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
Hi Anirud,
to tell the truth we haven't tested the timeout yet.
But I'm not sure whether you are understanding the meaning of the timeout correctly. The NON.ASF.RECEIVE.TIMEOUT determines the period of time that a MDB will wait when no message is currently in the queue before returning without a message.
What wait interval of 5000 ms do you see?
Ole |
|
Back to top |
|
 |
Anirud |
Posted: Fri Jul 21, 2006 4:49 am Post subject: |
|
|
 Master
Joined: 12 Feb 2004 Posts: 285 Location: Vermont
|
Hi Ole,
The 5000ms wait interval is the time that a MDB is waiting on the queue before returning a 2033.
We tested this with the parameter value set to 4000ms and it returns a 2033 every 4000ms. We are looking to increase this value to 10000ms or more to reduce the load on CPU (too many API calls). What we found (as of now) is the value can only be increased to 5000ms. i.e., even if we set the value to 10000ms, it is returning a 2033 after 5000ms.
Am I missing something? |
|
Back to top |
|
 |
Olel |
Posted: Fri Jul 21, 2006 5:36 am Post subject: |
|
|
Newbie
Joined: 05 Jul 2006 Posts: 6
|
I'm trying to check this.
But I'm not that expert
Ole |
|
Back to top |
|
 |
deesub |
Posted: Wed Sep 11, 2019 1:29 am Post subject: |
|
|
Novice
Joined: 08 Jun 2018 Posts: 12
|
was this fixed, what was the resolution ? |
|
Back to top |
|
 |
hughson |
Posted: Wed Sep 11, 2019 2:08 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
deesub wrote: |
was this fixed, what was the resolution ? |
This is such an old question with an ancient version of MQ I suggest you open a new question with your problem details.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
Arielle57 |
Posted: Tue Jun 15, 2021 8:38 pm Post subject: |
|
|
Newbie
Joined: 15 Jun 2021 Posts: 1
|
Thank you very much for this post. It's really nice of you. |
|
Back to top |
|
 |
|