I am attempting to connect to an ActiveMQ message bus to send data to another application. I have a code example from Developer Works but it is geared more towards WebSphere. When I try to make the connection, I receive the following error:
Failed to create InitialContext using factory specified in hashtable [Root exception is java.lang.NullPointerException]
The only change that I have made to the example is this code snippet:
// setup connection to JNDI provider
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
environment.put(Context.PROVIDER_URL, "tcp://myserver.company.com:41616");
Any help woul be appriciated.