Hi:
  I'm trying to create a SeviceMixClient using the unaltered code snippet
provided in the Client API section of the ServiceMix "Documentation" info
(Features - Client API section) currently on the Apache ServiceMix web site:

ClientFactory factory = new
InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
ServiceMixClient client = factory.createClient();
...
client.close();

When I try to execute this code I get the following exception on the
InitialContext().lookup call:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or
in an application resource file:  java.naming.factory.initial
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at com.lmco.ctest.main(ctest.java:28)

Has anybody else been able to do this successfully?  I have the ServiceMix
server running when I ran the test.

Thanx,
Randy
-- 
View this message in context: 
http://www.nabble.com/ServiceMix-Client-test-code-fails-tf3455098s12049.html#a9639057
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Reply via email to