1 Reply Latest reply on Mar 7, 2005 10:51 AM by deepee

    EJB Test Client

    israelkl

      Hi,

      Does any one knows where can I find explanation/example of how to use the EJB Test Client?
      It is not mentioned in the tutorial/installation docs.

      thanks,

      I tried to use it but I get:

      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
      at javax.naming.InitialContext.init(InitialContext.java:219)
      at javax.naming.InitialContext.(InitialContext.java:195)
      at com.silvermind.silverfm.scheduler.test.SchedulerEJBTestClient.getInitialContext(SchedulerEJBTestClient.java:34)
      at com.silvermind.silverfm.scheduler.test.SchedulerEJBTestClient.getHome(SchedulerEJBTestClient.java:43)
      at com.silvermind.silverfm.scheduler.test.SchedulerEJBTestClient.setUp(SchedulerEJBTestClient.java:56)
      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
      Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
      at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:219)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
      ... 16 more


      Thanks,

        • 1. Re: EJB Test Client
          deepee

          Hi,

          I had the same problem. You need the jbossall-client.jar and the log4j.jar from the JBOSS-HOME\client directory in your Java Build Path.

          long version: right click on project -> select properties -> click on Java build path -> select the Libraries tab -> click Add external Jars -> browse to the client $JBOSS-HOME$\directory -> select the jbossall-client.jar and the log4j.jar and "open" them -> click ok -> retest your client...

          Cheers,

          DP