activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From activemqnewbie <>
Subject nullpoinetexception while using jndi with built in examples
Date Thu, 13 Dec 2007 16:59:53 GMT

Am a newbie to activemq and trying to use with the examples
from activemq downloads.
I read and did the following
code changes
I appreciate if someone could reply back to my question and let me know
where i went wrong.
Am getting nullpointerexception.
below is the code snippet.

javax.naming.Context ctx = new javax.naming.InitialContext();
javax.jms.ConnectionFactory factory =
javax.jms.Topic mytopic = (javax.jms.Topic)ctx.lookup("MyTopic"); in apache-activemq-4.1.1\conf folder)

java.naming.factory.initial =org.activemq.jndi.ActiveMQInitialContextFactory 
#java.naming.factory.initial =

# use the following property to configure the default connector
java.naming.provider.url = tcp://hostname:61616

# use the following property to specify the JNDI name the connection factory
# should appear as. 
connectionFactoryNames =ConnectionFactory
# register some topics in JNDI using the form
# topic.[jndiName] = [physicalName]
topic.MyTopic =MyTopic


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message