6 Replies Latest reply on Aug 28, 2002 5:40 AM by bbbear

    Running Client

    yufu Newbie

      I have an EJB successfully deployed. And I can run the client from JBuilder which I used to develop EJB. But I can't run client from the command line. I have included the interfaces the library under /jboss/client. How to run the client? The error massage is:

      javax.naming.CommunicationException: Can't find SerialContextProvider

      Thank you.

        • 2. Re: Running Client
          Wallace Zou Newbie

          Adrian, Stop post your message! It never work out!


          • 3. Re: Running Client
            Adrian Brock Master

            Apparently the real problem (I'm told) is your jndi

            Try this link


            • 4. Re: Running Client
              bbbear Newbie

              Good day,

              I have been searching from forum to forum for ways to run an ejb client, however, it seems to be in vain. I'm in need of help! I have java.lang.NoClassDefFoundError error when I tried to run the client. What I understand is, I need to package the interface files of the EJB, the client, and a manifest file into a jar. I'm using JBoss2.4.4_Tomcat4.0.3, and deployed the jar file under /servers/jboss/client/ directory. Below is how I run my client. Have I missed anything?

              C:\servers\jboss\client>java -jar SmtFrame.jar com.si.sys..main.SmtFrame.class

              Exception in thread "main" java.lang.NoClassDefFoundError: javax/ejb/EJBHome
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:120)
              at com.si.con.ConMain.class$(Unknown Source)
              at com.si.con.ConMain.(Unknown Source)
              at com.si.con.ConMain.getInstance(Unknown Source)
              at com.si.sys.main.SmtFrame.(Unknown Source)
              at com.si.sys.main.SmtFrame.main(Unknown Source)

              My Manifest.mf contents:

              Manifest-Version: 1.0
              Created-By: Karen
              Main-Class: com.si.sys.main.SmtFrame



              • 5. Re: Running Client
                Joel Vogt Master

                you can have your client anywhere so longs as you have a valid jndi properties and the jboss client jars on your classpath.

                • 6. Re: Running Client
                  bbbear Newbie

                  Good day,

                  To follow up my last post, I now have this error after I include the jndi.properties file in the client jar.

                  Below is the output:

                  C:\servers\jboss\client>java -jar SmtFrame.jar com.si.sys.main.SmtFrame.class
                  Exception in thread "main" com.si.sys.gen.SiRuntimeException: Problem getting reference to SysConMainSess.: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory;
                  ---> nested javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
                  at com.si.con.SysConMain.(Unknown Source)
                  at com.si.con.SysConMain.getInstance(Unknown Source)
                  at com.si.sys.main.SmtFrame.(Unknown Source)
                  at com.si.sys.maint.SmtFrame.main(Unknown Source)

                  Any idea of what has gone wrong?