InitialContext using system properties

Hello,

To set up the environment for my context, I used Context.<Var name> (for ex, Context.PROVIDER_URL). It was working well.

Now to be more efficient, I wanted to use system properties instead.

I read that for the PROVIDER_URL, I needed to set up "java.naming.provider.url". I did the same for INITIAL_CONTEXT_FACTORY.

But when I executed my new program, it did not work. I got:

Exception in thread"main" java.lang.NullPointerException

at javax.naming.InitialContext.getURLScheme(InitialContext.java:228)

at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:277)

at javax.naming.InitialContext.lookup(InitialContext.java:351)

at com.lucent.lws.nebilight.NeBiJMSOutgoingGateway.setConnection(NeBiJMSOutgoingGateway.java:217)

at com.lucent.lws.nebilight.NeBiJMSOutgoingGateway.setConnectionParameters(NeBiJMSOutgoingGateway.java:327)

at com.lucent.nos.core.servers.data.JMSInterface.createOutgoingGateway(JMSInterface.java:342)

at com.lucent.nos.core.servers.data.JMSInterface.init(JMSInterface.java:113)

at com.lucent.nos.core.servers.data.JMSInterface.main(JMSInterface.java:94)

Did I forget something?

Thx in advance for your help.

[1286 byte] By [marlysaa] at [2007-11-27 3:34:53]
# 1
In fact the error was in the lookup command. The variable used was null and so it could not work.
marlysaa at 2007-7-12 8:38:02 > top of Java-index,Core,Core APIs...