3 Replies Latest reply on Jul 31, 2003 3:13 AM by limy

    An example "TestClient"

    limy Newbie

      After deploying Jbuilder7 & JBoiss3 , i creat a SessionBean and use "TestClient" to test. Unlukily, some errors thrown:


      E:\jdk1.3.1\bin\javaw -classpath "D:\work\test\classes;E:\jboss_tomcat\jboss-3.0.7_jakarta-tomcat-4.1.24\server\default\lib\jboss-j2ee.jar;E:\jboss_tomcat\jboss-3.0.7_jakarta-tomcat-4.1.24\tomcat-4.1.x\common\lib\servlet.jar;E:\jdk1.3.1\jre\lib\i18n.jar;E:\jdk1.3.1\jre\lib\jaws.jar;E:\jdk1.3.1\jre\lib\rt.jar;E:\jdk1.3.1\jre\lib\sunrsasign.jar;E:\jdk1.3.1\lib\dt.jar;E:\jdk1.3.1\lib\htmlconverter.jar;E:\jdk1.3.1\lib\tools.jar;E:\jdk1.3.1\demo\jfc\Java2D\Java2Demo.jar" test.testSesTestClient
      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: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 test.testSesTestClient.getJBossInitialContext(testSesTestClient.java:31)

      at test.testSesTestClient.(testSesTestClient.java:15)

      at test.testSesTestClient.main(testSesTestClient.java:46)

      java.lang.NullPointerException

      at test.testSesTestClient.main(testSesTestClient.java:50)

      Exception in thread "main"

      Will someone tell me the matter ?

        • 1. Re: An example "TestClient"
          Jon Barnett Master

          You should include the jbossall-client.jar in your client classpath so your client can connect and "talk" to the JBoss system. At least that is your current problem in the stacktrace.

          Hope that solves it.

          • 2. Re: An example "TestClient"
            limy Newbie

            Jonlee,thanks for your help.But,when checking,i find that the file jbossall-client.jar has already been in the client classpath.Then, what should i do? Help!!!

            • 3. Re: An example "TestClient"
              limy Newbie

              After removing superfluous file jbossOpentool.jar,i try running again. This time shown:


              E:\jdk1.3.1\bin\javaw -classpath "C:\jboss-3.0.0RC3\bin\run.jar;E:\jdk1.3.1\lib\tools.jar" -ms64m -mx64m -Dprogram.name=run.bat org.jboss.Main -c default
              java.lang.NoClassDefFoundError: org/jboss/Main

              Exception in thread "main"



              Then what 's the problem ? Iam really in truble!