users@glassfish.java.net

Re: Glassfish JMS - No object bound to name java:comp/env/jms

From: <forums_at_java.net>
Date: Thu, 22 Mar 2012 14:31:19 -0500 (CDT)

 

I added the following to the web.xml and it resolved the
NameNotFoundException:

    <!-- JMS Connection Factories (java:comp/env/jms) -->

    <resource-ref>

        <description>MyTopicConnectionFactory</description>

        <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>

        <res-type>javax.jms.TopicConnectionFactory</res-type>

        <res-auth>Container</res-auth>

    </resource-ref>

    <resource-ref>

        <description>EventScheduleTopic</description>

        <res-ref-name>jms/EventScheduleTopic</res-ref-name>

        <res-type>javax.jms.Topic</res-type>

        <res-auth>Container</res-auth>

Now I'm getting to following exception:



javax.naming.CommunicationException: Communication exception for
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
com.sun.enterprise.naming.logicalName=java:comp/env/jms/EventScheduleTopic}
[Root exception is com.sun.appserv.connectors.internal.api.PoolingException]

at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:542)

at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)

at javax.naming.InitialContext.lookup(InitialContext.java:411)

at javax.naming.InitialContext.lookup(InitialContext.java:411)

at
com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:90)

at
com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:776)

at
com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)

at
com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:169)

at
com.isomorphic.messaging.JMSMessageDispatcher.bindToChannel(JMSMessageDispatcher.java:105)

at
com.isomorphic.messaging.JMSMessageDispatcher.reconnect(JMSMessageDispatcher.java:95)

at
com.isomorphic.messaging.JMSMessageDispatcher.ensureConnected(JMSMessageDispatcher.java:100)

at
com.isomorphic.messaging.JMSMessageDispatcher.subscribe(JMSMessageDispatcher.java:131)

at
com.isomorphic.messaging.ISCMessageDispatcher.subscribe(ISCMessageDispatcher.java:149)

at
com.isomorphic.messaging.MessagingConnectionHandler.registerSubscriber(MessagingConnectionHandler.java:282)

at
com.isomorphic.messaging.MessagingConnectionHandler.process(MessagingConnectionHandler.java:114)

at com.isomorphic.messaging.MessagingServlet.doPost(MessagingServlet.java:91)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)

at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

at
com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:246)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)

at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)

at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)

at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)

at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)

at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)

at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)

at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

at java.lang.Thread.run(Thread.java:722)

Caused by: com.sun.appserv.connectors.internal.api.PoolingException

at
com.sun.enterprise.resource.beans.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:204)

at
com.sun.enterprise.resource.naming.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:134)

at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)

at
com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:556)

at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:514)

... 47 more

Caused by: java.security.PrivilegedActionException:
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException

at java.security.AccessController.doPrivileged(Native Method)

at
com.sun.enterprise.resource.beans.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:181)

... 51 more

Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException

at
com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:152)

at
com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:136)

... 53 more

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.GeneratedMethodAccessor558.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at
com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:105)

... 53 more

Caused by: java.lang.IllegalArgumentException: MQ:Topic:Invalid Topic Name -
jms/EventScheduleTopic

at com.sun.messaging.Topic.setName(Topic.java:96)

In Glassfish, I have the following JMS Resources defined:

Connection Factories:

jms/MyTopicConnectionFactory

Destination Resources:

jms/EventScheduleTopic

 


--
[Message sent by forum member 'cthinkel']
View Post: http://forums.java.net/node/884469