|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Configuring JMS Objects in Websphere Application Server 4 |
« View previous topic :: View next topic » |
Author |
Message
|
andrewhirst |
Posted: Tue May 17, 2005 9:46 am Post subject: Configuring JMS Objects in Websphere Application Server 4 |
|
|
 Apprentice
Joined: 06 Jul 2004 Posts: 33 Location: UK
|
Hello,
I get the following exception when I try and create a sender object:
I have run JMSAdmin to create the objects in JNDI. The JMS file contains this:
JMS exception sending SYNC message
javax.jms.JMSException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.MQQueueSession.getQueueOpenException(MQQueueSession.java:950)
at com.ibm.mq.jms.MQQueueSession.getOutputQueue(MQQueueSession.java:876)
at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:205)
at uk.co.xxxxx.application.isr.dataaccess.DataAccessObjectJMS.sendSYNCMessage(DataAccessObjectJMS.java:157)
at uk.co.xxxxx.application.isr.dataaccess.CustomerMQDAO.findCustomerByVehicle(CustomerMQDAO.java:395)
at uk.co.xxxxx.application.isr.dataaccess.CustomerMQDAO.findCustomerByVehicle(CustomerMQDAO.java:362)
at uk.co.xxxxx.application.isr.business.CustomerBO.findCustomerByVehicle(CustomerBO.java:242)
at uk.co.xxxxx.application.isr.sejb.CustomerProcessBean.findCustomerByVehicle(CustomerProcessBean.java:131)
at uk.co.xxxxx.application.isr.sejb.EJSRemoteStatelessCustomerProcess.findCustomerByVehicle(EJSRemoteStatelessCustomerProcess.java:441)
at uk.co.xxxxx.application.isr.sejb._CustomerProcess_Stub.findCustomerByVehicle(_CustomerProcess_Stub.java:639)
at uk.co.xxxxx.application.isr.business.CustomerProcessesBDImpl.findCustomerByVehicle(CustomerProcessesBDImpl.java:132)
at uk.co.xxxxx.application.isr.action.CustomerVehicleAction.findByRegistration(CustomerVehicleAction.java:327)
at uk.co.xxxxx.application.isr.action.CustomerVehicleAction.searchVehicle(CustomerVehicleAction.java:211)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at uk.co.xxxxx.application.isr.request.ISRRequestProcessor.processActionPerform(ISRRequestProcessor.java:96)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:138)
I ran JMSAdmin with the file given below:
Code: |
# create a jms context and move to it
def ctx(jms)
chg ctx(jms)
# create an uk context and move to it.
def ctx(uk)
chg ctx(uk)
# create a co context and move to it.
def ctx(co)
chg ctx(co)
# create a xxxxx context and move to it.
def ctx(xxxxx)
chg ctx(xxxxx)
# create an application context and move to it.
def ctx(application)
chg ctx(application)
# create an mq context and move to it.
def ctx(mq)
chg ctx(mq)
# create the QCF for the queue manager
def qcf(QueueConnectionFactory) qmgr(WAS01)
def q(customerdetailsrqst) qmgr() queue(Q.CUSTOMER.DETAILS.RQST) targclient(MQ) expiry(APP) persistence(QDEF)
def q(customerdetailsreply) qmgr() queue(Q.CUSTOMER.DETAILS.REPLY) targclient(MQ) expiry(APP) persistence(QDEF)
|
I believe that the problem is due to mis-configuration in the Websphere Admin Console. I have created a JMS Provider , IBM MQSeries, using WsInitialContextFactory, although I am confused as to what I should use for the Name and External JNDI Path settings (doesn't JMSAdmin do the same thing?). The same comments also appl to the JMS Destinations. What goes where?
Any help most gratefully recieved.
Regards, _________________ Andrew Hirst |
|
Back to top |
|
 |
bower5932 |
Posted: Tue May 17, 2005 11:49 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Can you catch the linked exception and post it here? I'd like to see the underlying WMQ error. You can search for linked exception on this site to get details.
As a guess, did you actually create the WMQ queues (Q.CUSTOMER.DETAILS.RQST, Q.CUSTOMER.DETAILS.REPLY) that go with your JMS queues? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 17, 2005 6:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Remember using the file context you cannot retrieve something like
aa/bb/cc/nn/jms/myqueue.
You would have to retrieve each subcontext on its own and then use the subcontext to retrieve the queue.
Anyway if you are using WebSphere WAS you should be using the
Websphere MQ JMS provider and set it up in the WAS management console.
Forget about doing anything with the file context.
Enjoy  |
|
Back to top |
|
 |
andrewhirst |
Posted: Wed May 18, 2005 12:06 am Post subject: |
|
|
 Apprentice
Joined: 06 Jul 2004 Posts: 33 Location: UK
|
Quote: |
Can you catch the linked exception and post it here? I'd like to see the underlying WMQ error. You can search for linked exception on this site to get details. |
I will include the required code, but it will take a few days to be deployed into our test system. Watch this space......
Quote: |
As a guess, did you actually create the WMQ queues |
Yes, all queues exist, although I will check to see if the WAS server can see the queues on the broker as we use clusters.
Quote: |
Anyway if you are using WebSphere WAS you should be using the
Websphere MQ JMS provider and set it up in the WAS management console. |
This is part of the problem.... Knowing what goes where. Perhaps someone can clarify this a little. When using the WAS management console, do I need to run JMSAdmin?
TIA
Andrew. _________________ Andrew Hirst |
|
Back to top |
|
 |
bower5932 |
Posted: Wed May 18, 2005 6:42 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
From your subject, you are using WAS 4. Is this right? If so, you can use JMSAdmin to create your objects in the WAS namespace. However, with WAS 5, JMSAdmin puts its objects in a non-persistent part of the namespace and you have to recreate them every time that WAS comes down. |
|
Back to top |
|
 |
andrewhirst |
Posted: Wed May 18, 2005 6:52 am Post subject: |
|
|
 Apprentice
Joined: 06 Jul 2004 Posts: 33 Location: UK
|
Quote: |
If so, you can use JMSAdmin to create your objects in the WAS namespace |
So is it true to say that I do not need to configure anything in WAS?
Quote: |
As a guess, did you actually create the WMQ queues (Q.CUSTOMER.DETAILS.RQST, Q.CUSTOMER.DETAILS.REPLY) that go with your JMS queues? |
I rechecked that the queues existed, and they did. However, the qmgr on the WAS box could not see the clustered queues on the broker box. That is why the exception occured. Everything seemed OK: channels, etc were running, but amqsputs would fail. Eventually, we destroyed the WAS qmgr and re-built it.
Many thanks for all your help.
Andrew. _________________ Andrew Hirst |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|