1 Reply Latest reply on May 10, 2002 7:31 AM by Adrian Brock

    remote access to JNDI???

    Andrew Newbie

      Hi. Just working through the JBoss tutorial example on JMS. The code works find on localhost, as expected. However, when I try the code (ie. ManualJNDI, HelloPublisher, etc...) from a remote machine I get the following runtime exception:


      C:\examples>java -cp ./; org.jboss.docs.jms.client.ManualJNDI
      Could not lookup topic/testTopic
      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory. Root exception is java.lang.ClassNotFoundException:
      org.jnp.interfaces.NamingContextFactory
      at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:207)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
      at javax.naming.InitialContext.init(InitialContext.java:219)
      at javax.naming.InitialContext.(InitialContext.java:195)
      at org.jboss.docs.jms.client.ManualJNDI.getInitialContext(ManualJNDI.java:42)
      at org.jboss.docs.jms.client.ManualJNDI.main(ManualJNDI.java:52)

      C:\examples>

      I'm changing the jndi properties (either the hashtable in ManualJNDI or the jndi.properties file) accordingly. What could be causing this error? I noticed that java.security is only one call down on the stack trace.. is it a security issue? What do I need to do to create an initial context remotely? Can anybody point me in the right direction?

      All help is appreciated.

      Andrew