NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

RAR7096 While Sending JMS Message from MDB

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
gardner



Joined: 24 Nov 2010
Posts: 10

PostPosted: Sat Dec 04, 2010 2:51 am    Post subject: RAR7096 While Sending JMS Message from MDB Reply with quote

Hello,
I have been trying to solve this for days now and I was hoping that someone here may be able to provide some insight or advice. I have a servlet that creates an entity. On post persist, the entity sends a message to an MDB and that MDB in turn creates a new entity and then sends an JSM message to a queue that is intended to be received by an app client. Everything works as expected until attempting to lookup the jms destination. Right after:
Code:

InitialContext.lookup("jms/run/android");

I receive:
Code:

WARNING: RAR7096: Exception null while trying to set the value jms/run/android on property Name
SEVERE: enterprise_naming.serialctx_communication_exception
SEVERE: com.sun.appserv.connectors.internal.api.PoolingException


After inspecting the stack dump I assumed that my jms resources were configured incorrectly but asadmin shows this to be incorrect.
Quote:

usurper:Duga gbickfor$ asadmin list-jms-resources
jms/build
jms/run/android
jms/connectionFactory

Command list-jms-resources executed successfully.
usurper:Duga gbickfor$


Where should I be looking from here?

Thank you,
Gardner


Quote:

Product Version: NetBeans IDE 6.9.1 (Build 201011082200)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.6.4 running on x86_64; MacRoman; en_US (nb)


Code:

private void sendRunToAndroid(Run run) throws NamingException, JMSException {
   Context c = new InitialContext();
   ConnectionFactory cf = (ConnectionFactory) c.lookup("jms/connectionFactory");
   Connection conn = null;
   Session s = null;
   try {
      conn = cf.createConnection();
      s = conn.createSession(false, s.AUTO_ACKNOWLEDGE);
      Destination destination = (Destination) c.lookup("jms/run/android");
      MessageProducer mp = s.createProducer(destination);
      ObjectMessage om = s.createObjectMessage(run);
      mp.send(om);
   } finally {
      if (s != null) {
         try {
            s.close();
         } catch (JMSException e) {
            Logger.getLogger(Run.class.getName()).log(Level.WARNING, "Cannot close session", e);
         }
      }
      if (conn != null) {
         conn.close();
      }
   }
}


The complete stack dump:
Code:

WARNING: [MDBContainer] Current thread done cleanup()...
INFO: file:/Users/gbickfor/src/gbickfor_mbp/wwwroot/Players/Projects/Duga/dist/gfdeploy/Duga/Duga-ejb_jar/_Duga-ejbPU logout successful
INFO: ACDEPL104: Java Web Start services stopped for the app client Duga/Duga-app-client.jar
INFO: Portable JNDI names for EJB RunFacade : [java:global/Duga/Duga-ejb/RunFacade, java:global/Duga/Duga-ejb/RunFacade!com.adobe.duga.ejb.RunFacade]
INFO: com.adobe.duga.ejb.Run actually got transformed
INFO: endpoint.determine.destinationtype
INFO: Portable JNDI names for EJB BuildFacade : [java:global/Duga/Duga-ejb/BuildFacade, java:global/Duga/Duga-ejb/BuildFacade!com.adobe.duga.ejb.BuildFacade]
INFO: com.adobe.duga.ejb.Build actually got transformed
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/Users/gbickfor/src/gbickfor_mbp/wwwroot/Players/Projects/Duga/dist/gfdeploy/Duga/Duga-ejb_jar/_Duga-ejbPU login successful
WARNING: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sequence' already exists
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Loading application Duga#Duga-war.war at Duga-war
INFO: ACDEPL103: Java Web Start services started for the app client Duga/Duga-app-client.jar (contextRoot: /Duga/Duga-app-client)
INFO: Duga was successfully deployed in 1,087 milliseconds.
INFO: Platform: android
INFO: Saved run: 2
WARNING: RAR7096: Exception null while trying to set the value jms/run/android on property Name
SEVERE: enterprise_naming.serialctx_communication_exception
SEVERE: com.sun.appserv.connectors.internal.api.PoolingException
        at com.sun.enterprise.resource.beans.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:199)
        at com.sun.enterprise.resource.naming.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:128)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.adobe.duga.ejb.RunAgentBean.sendRunToAndroid(RunAgentBean.java:57)
        at com.adobe.duga.ejb.RunAgentBean.onMessage(RunAgentBean.java:93)
        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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4087)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5272)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1086)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:76)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:166)
        at $Proxy257.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:258)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:92)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
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:176)
        ... 25 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException
        at com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:140)
        at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:126)
        ... 27 more
Caused by: java.lang.reflect.InvocationTargetException
        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 com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:99)
        ... 27 more
Caused by: java.lang.IllegalArgumentException: MQ:Queue:Invalid Queue Name - jms/run/android
        at com.sun.messaging.Queue.setName(Queue.java:90)
        ... 32 more

SEVERE: The log message is null.
javax.naming.CommunicationException: Communication exception for SerialContext  [Root exception is com.sun.appserv.connectors.internal.api.PoolingException]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:461)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.adobe.duga.ejb.RunAgentBean.sendRunToAndroid(RunAgentBean.java:57)
        at com.adobe.duga.ejb.RunAgentBean.onMessage(RunAgentBean.java:93)
        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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4087)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5272)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1086)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:76)
        at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:166)
        at $Proxy257.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:258)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:92)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
Caused by: com.sun.appserv.connectors.internal.api.PoolingException
        at com.sun.enterprise.resource.beans.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:199)
        at com.sun.enterprise.resource.naming.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:128)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437)
        ... 21 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:176)
        ... 25 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException
        at com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:140)
        at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:126)
        ... 27 more
Caused by: java.lang.reflect.InvocationTargetException
        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 com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:99)
        ... 27 more
Caused by: java.lang.IllegalArgumentException: MQ:Queue:Invalid Queue Name - jms/run/android
        at com.sun.messaging.Queue.setName(Queue.java:90)
        ... 32 more
Back to top
gardner



Joined: 24 Nov 2010
Posts: 10

PostPosted: Sat Dec 11, 2010 9:18 pm    Post subject: Reply with quote

Just in case you run into this. I had a stale reference in my sun-ejb-jar.xml in my ejb project. The IDE wizards add these references when creating new ejbs or mdbs.

-g
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo