5 Replies Latest reply on Jan 8, 2003 3:31 PM by jBosser

    Problem running HelloWorld program (JNDI Issues ?)

    jBosser Newbie

      I am a JBOSS newbie. While trying to run the HelloWorld program I am getting the following error:



      D:\ejbRoot\HelloWorld\classes>c:\j2sdk1.3\bin\java -cp "d:\jbtc\Jboss\\client\jnp-client.jar;d:\jbt
      c\Jboss\\client\concurrent.jar;d:\jbtc\Jboss\\client\jaas.jar;d:\jbtc\Jboss\\client\jacorb.jar;d:\jb
      tc\Jboss\\client\jboss-client.jar;d:\jbtc\Jboss\\client\jboss-common-client.jar;d:\jbtc\Jboss\\clien
      t\jboss-iiop-client.jar;d:\jbtc\Jboss\\client\jboss-j2ee.jar;d:\jbtc\Jboss\\client\jboss-jsr77.jar;d
      :\jbtc\Jboss\\client\jboss-net-client.jar;d:\jbtc\Jboss\\client\jboss-system-client.jar;d:\jbtc\Jbos
      s\\client\jbossall-client.jar;d:\jbtc\Jboss\\client\jbossha-client.jar;d:\jbtc\Jboss\\client\jbossjm
      x-ant.jar;d:\jbtc\Jboss\\client\jbossmq-client.jar;d:\jbtc\Jboss\\client\jbossmqha.jar;d:\jbtc\Jboss
      \\client\jbosssx-client.jar;d:\jbtc\Jboss\\client\jcert.jar;d:\jbtc\Jboss\\client\jmx-connector-clie
      nt-factory.jar;d:\jbtc\Jboss\\client\jmx-ejb-connector-client.jar;d:\jbtc\Jboss\\client\jmx-rmi-conn
      ector-client.jar;d:\jbtc\Jboss\\client\jnet.jar;d:\jbtc\Jboss\\lib\jsse.jar;d:\jbtc\Jboss\\lib\log4j
      .jar;c:\j2sdkee1.3\lib\j2ee.jar;..\lib\HelloWorld.jar" -Djava.security.policy=../java.policy exampl
      es.HelloClient
      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFa
      ctory. Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:190)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:40)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
      at javax.naming.InitialContext.init(InitialContext.java:217)
      at javax.naming.InitialContext.(InitialContext.java:193)
      at examples.HelloClient.main(HelloClient.java:23)
      Exception: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory


      As you see - I have added all the jar files under %jboss_home%\lib\ to the classpath while running the client.

      I am using jdk 1.4.1 and JBoss 3.04 (tomcat 4.1.12 ).
      I see this problem with jdk 1.3.1 also.

      --