This content has been marked as final.
Show 4 replies
-
1. Re: JMS, JNDI and remote client access.
jaikiran Nov 4, 2005 12:37 AM (in response to clairecostello)"clairecostello" wrote:
I want a handle to "MyQueue" queue
In your code, instead of :Object tmp = ctx.lookup("queue");
do the following:Object tmp = ctx.lookup("queue/MyQueue");
-
2. Re: JMS, JNDI and remote client access.
clairecostello Nov 4, 2005 9:49 AM (in response to clairecostello)Hi,
Thanks for your reply. I tried what you suggested but get the following error output:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getObjectFactoryFromReference(Unknown Source)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1110)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:690)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.iwise.process.test.EventQueueClient.sendToEventQueue(EventQueueClient.java:56)
at com.iwise.process.test.EventQueueClient.main(EventQueueClient.java:30)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:355)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
at org.activemq.jndi.JNDIReferenceFactory.<clinit>(JNDIReferenceFactory.java:40)
... 12 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:543)
... 15 more
Any clues here? It's like it doesn't know about "MyQueue" or something but yet it is listed in the JNDI service of JMX Console.
TIA.
-Claire -
3. Re: JMS, JNDI and remote client access.
colincrist Nov 7, 2005 11:03 AM (in response to clairecostello)
I suspect that when you view destinations bound via JNDI in the admin console, JBoss is not trying to defreference then, rather it just lists whats there with their classname - aka javax.naming.Context.listBindings and the way in which JNDI binds objects via a Reference.
Your problem is config/classpath related I would guess.
This looks smelly:Caused by: java.lang.NullPointerException at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:543) ... 15 more
Consequently, I'd suggest you post on the ActiveMQ newsgroups for some feedback from users there as its more likely it's your configuration with ActiveMQ that is causing you woes.
You can browse them online:
http://gmane.org/find.php?list=activemq
Cheers,
Colin
http://hermesjms.com -
4. Re: JMS, JNDI and remote client access.
clairecostello Nov 7, 2005 11:36 AM (in response to clairecostello)Hi Colin,
Thanks for your reply. I'll have a look through activemq forum.
-Claire.