2 Replies Latest reply on Apr 15, 2002 5:19 PM by Thomas Schwob

    Cannot set up Context in jndi.properties

    Thomas SMETS Newbie

      I dunno why but if I insert in my jndi.properties


      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      Actually it's all there is in the file :-)
      I got the following Exception :

      [java] Main...
      [java] got the context...
      [java] Exception is : javax.naming.NoInitialContextException
      [java] Exception message is : 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


      While if I set up the Context in the app, like in :

      System.setProperty( "java.naming.factory.initial",
      "org.jnp.interfaces.NamingContextFactory");
      System.setProperty( "java.naming.provider.url",
      "localhost:1099");


      Everything works fine ....
      Could somebody tell me what I could do wrong ?

      Thomas,