5 Replies Latest reply on May 4, 2003 11:58 AM by juhalindfors

    COULD_NOT_FIND_SERVLET_JAR

    alexandru

      hello.
      i'm new to JBoss, and i can't run the example from documentation-example(btw, my english is not very good, sorry...:)
      so, when i run: ant intro-interest-jar everything is ok except this:
      [echo] Using base classpath=/Install/Java/JBoss/client/
      jboss-j2ee.jar:/Install/Java/JBoss/client/jaas.jar:
      /Install/Java/JBoss/client/jbosssx-client.jar:
      /Install/Java/JBoss/client/jboss-client.jar:
      /Install/Java/JBoss/client/jnp-client.jar:
      /home/alex/java/examples/COULD_NOT_FIND_SERVLET_JAR
      jar -tvf
      then i run
      /home/alex/java//examples/build-examples/interest/interest.jar
      is ok
      and after this, i copy interest.jar in JBOSS_DIST/server/default/deploy and i make the file InterestClient.java and run ant intro-interest-client and i get this message:
      compile:

      interest-client:
      [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
      [java] at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:89)
      [java] at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:42)
      [java] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
      [java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
      [java] at javax.naming.InitialContext.init(InitialContext.java:219)
      [java] at javax.naming.InitialContext.<init>(InitialContext.java:175)
      [java] at org.jboss.docs.interest.InterestClient.main(InterestClient.java:27)
      [java] Java Result: 1

      who can help me to run this example and to tell me what is wrong...
      10x in advance

        • 1. Re: COULD_NOT_FIND_SERVLET_JAR
          zaki

          hi,
          i am a newbie in Jboss.
          and i have the same problem trying to compile and run the Client example.
          Do you cam to any Solutions.

          Thanks
          zaki

          • 2. Re: COULD_NOT_FIND_SERVLET_JAR
            thomashoff

            I assume you are using the online manual for the interest sample. This uses Ant to compile your code. Ant uses build.xml file in the directory where you are executing the command. Open this file and you can see the path declaration. Add a new entry including the path for your servlet.jar file. To find the jar, do a search in the install directory for servlet.jar in the install (and subdirectories.)

            This should solve your problem.

            • 3. Re: COULD_NOT_FIND_SERVLET_JAR

              If you are talking about the example template, follow the instructions on pg 28 of the Quick Start guide. Make sure you copy .ant.properties.example to .ant.properties and modify the properties to point to your jboss install. You shouldn't need to modify the build.xml.

              Jim

              • 4. Re: COULD_NOT_FIND_SERVLET_JAR
                vikasram

                What was reason for
                interest-client:
                [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
                [java] at org.jnp.interfaces.NamingContext.(NamingContext.java:89)
                [java] at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:42)
                [java] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
                [java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
                [java] at javax.naming.InitialContext.init(InitialContext.java:219)
                [java] at javax.naming.InitialContext.(InitialContext.java:175)
                [java] at org.jboss.docs.interest.InterestClient.main(InterestClient.java:27)
                [java] Java Result: 1


                I am getting same exception.
                Can anybody help ?
                thanks in advance.

                • 5. Re: COULD_NOT_FIND_SERVLET_JAR

                  Make sure you're including all the libs from the jboss/client dir in your classpath.