|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JNDIException with MQ call. |
« View previous topic :: View next topic » |
Author |
Message
|
pasupulathisp |
Posted: Thu Apr 30, 2009 9:11 am Post subject: JNDIException with MQ call. |
|
|
Novice
Joined: 28 Apr 2009 Posts: 23
|
I am trying to put a message on Queue through a Servlet.I am able to read and write messages to the Queue,if i have the hostName,port,channel,qmgr and qName.But when i try to use a JNDI lookup i am having some exception,both MQ and Weblogic are on local. (and later i would like to connect remote MQ through JNDI.)I tried to look at some code through the sample code link in this forum,but looks like its broken.
Code:
String queueName = "java:comp/env/jms/WLMMyReplyQueue";
jndiContext = new InitialContext();
queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("java:comp/env/jms/WLSenderQCF");
Here is the exception
Quote:
javax.naming.NameNotFoundException: While trying to look up comp/env/jms/WLSenderQCF in /app/webapp/WebContent/5333825.; remaining name 'comp/env/jms/WLSenderQCF'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Ljava/lang/String;Ljava/lang/String;Ljava/util/Hashtable;)Ljavax/naming/NameNotFoundException;(BasicNamingNode.java:924)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(Ljava/lang/String;Ljava/util/Hashtable;)Ljava/lang/Object;(ApplicationNamingNode.java:150)
at weblogic.jndi.internal.WLEventContextImpl.lookup(Ljavax/naming/Name;Ljava/lang/String;)Ljava/lang/Object;(WLEventContextImpl.java:256)
at weblogic.jndi.internal.WLContextImpl.lookup(Ljava/lang/String;)Ljava/lang/Object;(WLContextImpl.java:363)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyContextWrapper.java:45)
at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.java:130)
at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
at com.medplus.test.MqServlet.putMessage()V(MqServlet.java:50)
at com.medplus.test.MqServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(MqServlet.java:37)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.contact admin(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
On the Weblogic Server (Version 8 ),i defined the Local JNDI Name =jms/WLSenderQCF under foreign JMS Connection Factory and jms/WLMyReplyQueue under Foreign JMS Destination.I did add the resource references to the servlet.
I am not sure how to dump the JNDI in weblogic.
Please advice if i am missing any configurations.
Thanks |
|
Back to top |
|
 |
pasupulathisp |
Posted: Thu Apr 30, 2009 11:12 am Post subject: |
|
|
Novice
Joined: 28 Apr 2009 Posts: 23
|
I got this moving a step ahead.The only thing i had to modify is the remove "java:comp/env" from the queueName.
String queueName = "jms/WLMyReplyQueue";
The exception which i am getting right now is:
Exception:
javax.jms.JMSException: JMSCS0006: An internal problem occurred. Diagnostic information for service was written to 'C:\bea\user_projects\domains\WeblogicMQ\FFDC\JMSCC0580.FDC'. Please terminate the application as the product is in an inconsistent internal state.
at com.ibm.msg.client.commonservices.trace.Trace.ffst(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;Ljava/lang/Class;)V(Trace.java:1353)
at com.ibm.msg.client.wmq.internal.WMQConnection.close()V(WMQConnection.java:641)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(Lcom/ibm/msg/client/jms/JmsPropertyContext;)Lcom/ibm/msg/client/provider/ProviderConnection;(WMQConnectionFactory.java:7396)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(Ljava/lang/String;Ljava/lang/String;)Ljavax/jms/Connection;(JmsConnectionFactoryImpl.java:276)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(Ljava/lang/String;Ljava/lang/String;)Lcom/ibm/msg/client/jms/JmsConnection;(MQConnectionFactory.java:6055)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection()Ljavax/jms/QueueConnection;(MQQueueConnectionFactory.java:115)
at com.medplus.test.MqServlet.putMessage()V(MqServlet.java:70)
at com.medplus.test.MqServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(MqServlet.java:39)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.contact admin(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
Closing Connection
Thanks |
|
Back to top |
|
 |
pasupulathisp |
Posted: Thu Apr 30, 2009 12:31 pm Post subject: |
|
|
Novice
Joined: 28 Apr 2009 Posts: 23
|
Just a fyi.My weblogic Version 8 uses jrockit81sp5_142_08,while MQ version of java is Java1.6.
Do we need to have both of them running on the same platform?
Thanks |
|
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
|
|
|
|