1 Reply Latest reply on Jul 9, 2004 5:43 AM by Rene Zanner

    newbie question on a simple helloworld app using JBOSS-3.2.5

    Sabu Bhatia Newbie

      Hi

      I wrote a simple one line hello world bean and deployed the jar file (all HOME, REMOTE,, BEAN, XNL files etc are in the jar and was verified).
      The bean simpy returns one line of text saying helloworld.

      I wrote a simple java client and built it. Now I am trying to run it but it fails with the following exception: (Note I include the following files in the class path when I run the client
      JBOSS_DIST\client\jbosssx-client.jar
      JBOSS_DIST\client\jbossclient.jar
      JBOSS_DIST\client\jnpclient.jar
      JBOSS_DIST\client\jboss-j2ee.jar
      JBOSS_DIST\client\log4j.jar
      )
      Note sure if I need to include for jar files or less jar files in my classpath. I am not currently using ant. Just compiling and building and running on the command line.

      Any help would be appreciated.


      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Log
      ger
      at org.jnp.interfaces.NamingContext.(NamingContext.java:102)
      at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingConte
      xtFactory.java:41)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
      62)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
      )
      at javax.naming.InitialContext.init(InitialContext.java:219)
      at javax.naming.InitialContext.(InitialContext.java:195)
      at InterestClient.main(InterestClient.java:41)

        • 1. Re: newbie question on a simple helloworld app using JBOSS-3
          Rene Zanner Newbie

           

          "sabubh" wrote:

          ...snip...

          JBOSS_DIST\client\jbosssx-client.jar
          JBOSS_DIST\client\jbossclient.jar
          JBOSS_DIST\client\jnpclient.jar
          JBOSS_DIST\client\jboss-j2ee.jar
          JBOSS_DIST\client\log4j.jar

          ...snip...

          Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger

          ...snip...


          Hi sabubh,

          try to include the jar file "JBOSS_DIST\client\jbossall-client.jar" in you classpath. It contains at least the missing "org/jboss/logging/Logger" class.

          Maybe it's mandatory to be included - I think you should study the docs about the required jars for client applications.

          Sincerely,

          René