users@glassfish.java.net

JMS lookup type error [JMSJCA-E191,JMSJCA-E096]

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 Jan 2010 17:18:04 PST

Hi there,

I've been banging my head against this problem for a couple of days now with no luck.
Originally the problem I had was with resource injection via the @Resource annotation in an EJB (it never instantiated). When I looked at my jms configuration I noticed that I had hacked together a connection factory by manually defining the jms connection pool and connector resource. I rectified my error in generating a connection factory, which in turn automatically generated the relevant connectors.
Instead of fixing my injection problem however, it caused every jms connector I was using to throw much the same as the following error:

[#|2010-01-08T11:03:40.828+1300|SEVERE|sun-appserver2.1|sun-jms-binding.com.sun.jbi.jmsbc.JMSBindingDeployer|_ThreadID=117;_ThreadName=rtf-parse-sun-jms-binding;_RequestID=842b60f1-8e64-4b9f-b84c-7a902d0c1a55;|JMSBC-E0728: Failed to start the service unit rtf-parse-sun-jms-binding: JMSBC-E0754: Failed to start endpoint jmsrecnmea1_InPort of service {http://j2ee.netbeans.org/wsdl/rtf-parse-bpel/jmsrecnmea1}JMSInService
javax.jbi.JBIException: JMSBC-E0754: Failed to start endpoint jmsrecnmea1_InPort of service {http://j2ee.netbeans.org/wsdl/rtf-parse-bpel/jmsrecnmea1}JMSInService
        at com.sun.jbi.jmsbc.ServiceUnitImpl.start(ServiceUnitImpl.java:440)
        at com.sun.jbi.jmsbc.JMSBindingDeployer.start(JMSBindingDeployer.java:281)
        at com.sun.jbi.framework.ServiceUnitOperation.process(ServiceUnitOperation.java:185)
        at com.sun.jbi.framework.Operation.run(Operation.java:104)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.jbi.jmsbc.jms.ChannelException: JMSBC-E0205: Failed to start channel for connection lookup://jms/rtf
        at com.sun.jbi.jmsbc.jms.ReceiveChannelJCAImpl.internalStart(ReceiveChannelJCAImpl.java:235)
        at com.sun.jbi.jmsbc.jms.ReceiveChannelJCAImpl.start(ReceiveChannelJCAImpl.java:191)
        at com.sun.jbi.jmsbc.ServiceUnitImpl.start(ServiceUnitImpl.java:747)
        at com.sun.jbi.jmsbc.ServiceUnitImpl.startConsuming(ServiceUnitImpl.java:680)
        at com.sun.jbi.jmsbc.ServiceUnitImpl.start(ServiceUnitImpl.java:396)
        ... 4 more
Caused by: javax.resource.ResourceException: JMSJCA-E096: Failed to lookup [jms/rtf] in [lookup://jms/rtf]: java.lang.Exception: JMSJCA-E191: Incompatible object specified: the object must of type 'com.stc.jmsjca.core.JConnectionFactory' but the object bound to 'lookup://jms/rtf' is of type 'com.sun.messaging.jms.ra.DirectConnectionFactory'
        at com.stc.jmsjca.util.Exc.rsrcExc(Exc.java:71)
        at com.stc.jmsjca.core.RAJMSResourceAdapter.adjustActivationSpec(RAJMSResourceAdapter.java:443)
        at com.stc.jmsjca.core.RAJMSResourceAdapter.endpointActivation(RAJMSResourceAdapter.java:295)
        at com.sun.jbi.jmsbc.jms.ReceiveChannelJCAImpl.internalStart(ReceiveChannelJCAImpl.java:224)
        ... 8 more
Caused by: java.lang.Exception: JMSJCA-E191: Incompatible object specified: the object must of type 'com.stc.jmsjca.core.JConnectionFactory' but the object bound to 'lookup://jms/rtf' is of type 'com.sun.messaging.jms.ra.DirectConnectionFactory'
        at com.stc.jmsjca.util.Exc.exc(Exc.java:133)
        at com.stc.jmsjca.core.RAJMSResourceAdapter.adjustActivationSpec(RAJMSResourceAdapter.java:378)
        ... 10 more
|#]

My JMS configuration is such (I copied almost all of it from the existing connectors):

JNDI Name: jms/rtf
Pool Name: jms/rtf
Type javax.jms.ConnectionFactory
Initial and Minimum Pool Size: 0
Maximum Pool Size: 32
Pool Resize Quantity: 4
Idle Timeout: 25000
Max Wait Time: 60000
Transaction Support: NoTransaction
Password: (default_JMS_host)
UserName: (default_JMS_host)
ConnectionURL: mq://(default_JMS_host)
Options: JMSJCA.sep=,# Enter options here

While I've got the suspicion that my change did nothing to fix the original problem, I'm sure I could revert my changes and get all the jms working again. I would however still be stuck with @Resource annotations in an EJB that don't work.

Does anyone know what I'm doing wrong here? More importantly, what I need to do right?
[Message sent by forum member 'petercu' (peter.cummuskey_at_arta.co.nz)]

http://forums.java.net/jive/thread.jspa?messageID=379486