2 Replies Latest reply on Apr 8, 2009 1:35 AM by santosh kumar

    JNDI Proplem for JMS

    santosh kumar Newbie

      we are try to configure connection factory for message. but we got exception ......

      2009-04-08 10:21:09,466GMT WARN [EH3.0][EventConnectionFactory] [getQueueConnection] [004] :: [Exception] Unable to retrieve the QCF object from JNDI, trying again .. -
      javax.naming.NameNotFoundException: ivtQCF not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      at sun.rmi.transport.Transport$1.run(Transport.java:159)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.crimsonlogic.event.EventConnectionFactory.getQueueConnection(Unknown Source)
      at com.crimsonlogic.event.EventProducer.commitQueue(Unknown Source)
      at com.crimsonlogic.event.EventProducer.send(Unknown Source)
      at com.crimsonlogic.event.testapps.sender.EventSender.sendEvent(Unknown Source)
      at com.crimsonlogic.event.testapps.action.EventSendAction.process(Unknown Source)
      at com.crimsonlogic.event.testapps.servlet.EventHandlerServlet.doPost(Unknown Source)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      2009-04-08 10:21:09,528GMT ERROR [EH3.0][EventConnectionFactory] [getQueueConnection] [004] :: [Exception] Unable to retrieve the QCF object from JNDI - STACKTRACE =
      javax.naming.NameNotFoundException: ivtQCF not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      at sun.rmi.transport.Transport$1.run(Transport.java:159)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.crimsonlogic.event.EventConnectionFactory.getQueueConnection(Unknown Source)
      at com.crimsonlogic.event.EventProducer.commitQueue(Unknown Source)
      at com.crimsonlogic.event.EventProducer.send(Unknown Source)
      at com.crimsonlogic.event.testapps.sender.EventSender.sendEvent(Unknown Source)
      at com.crimsonlogic.event.testapps.action.EventSendAction.process(Unknown Source)
      at com.crimsonlogic.event.testapps.servlet.EventHandlerServlet.doPost(Unknown Source)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)




      See the configuration file are :


      destination-service.xml

      <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=evtTESTEH3Queue"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>


      connection-factories-service.xml


      <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
       name="jboss.messaging.connectionfactory:service=evtTESTEH3Queue"
       xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
      
       <attribute name="JNDIBindings">
       <bindings>
       <binding>/ivtQCF</binding>
       <binding>java:/ivtQCF</binding>
       </bindings>
       </attribute>
       </mbean>



      Tahnks in adv.!!!



        • 1. Re: JNDI Proplem for JMS
          Yong Hao Gao Master

          Hi,

          What version of JBM/AS are you using? Also please put your client side JNDI lookup code here. It would be more help to figure out the problem. Thanks.

          • 2. Re: JNDI Proplem for JMS
            santosh kumar Newbie

            we are using JBoss EnterprisePlatform-4.3.0.GA with jdk1.6.

            Client side Configuration File have followinf content

            <event-descriptor eventtype="EVTTEST">
             <destination-type>Queue</destination-type>
             <destination-jndi-name>evtTESTEH3Queue</destination-jndi-name>
             <initial-context-factory>org.jnp.interfaces.NamingContextFactory</initial-context-factory>
             <provider-url>jnp://localhost:1099</provider-url>
             <connection-factory-jndi-name>ivtQCF</connection-factory-jndi-name>
             </event-descriptor>


            Client side JNDi lookup code are:
             factory = (QueueConnectionFactory)evtconn.getInitialDirContext().lookup( evtconn.getConnectionFactoryJndiName() );
             queueConn = factory.createQueueConnection();
             EventLogger.PRO.info(className+inMethod+" !!! GOT QueueConnection - "+queueConn);
             return queueConn;
             }catch( Exception e ) {
             EventLogger.ERR.warn(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI, trying again .. - ",e);
            
             try {
             ctxhtable = new Hashtable();
             initContext();
             factory = (QueueConnectionFactory)evtconn.getInitialDirContext().lookup( evtconn.getConnectionFactoryJndiName() );
             queueConn = factory.createQueueConnection();
             EventLogger.PRO.info(className+inMethod+" !!! GOT QueueConnection - "+queueConn);
             return queueConn;
             }catch(ClassCastException ccExp)
             {
             EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.EVT_ERROR+":: [EventCommitException] Pls., check the connection factory object in evtConfig.xml and ensure MQ jars are in the CLASSPATH - "+ccExp.getMessage());
             EventLogger.ERR.error(className+inMethod+EventConstant.EVT_ERROR+":: [EventCommitException] Pls., check the connection factory object in evtConfig.xml and ensure MQ jars are in the CLASSPATH - ",ccExp);
             throw ecx;
             }catch(Exception exc){
             EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI - "+e.getMessage());
             EventLogger.trace(className+inMethod+EventConstant.JMS_ERROR+":: [Exception] Unable to retrieve the QCF object from JNDI - ",EventLogger.ERR,e);
             throw ecx;
             }catch(Throwable th){
             EventCommitException ecx = new EventCommitException(className+inMethod+EventConstant.JMS_ERROR+":: [Throwable] Unable to retrieve the QCF object from JNDI - ");
             EventLogger.trace(className+inMethod+EventConstant.JMS_ERROR+":: [Throwable] Unable to retrieve the QCF object from JNDI - ",EventLogger.ERR,th);
             throw ecx;
             }