3 Replies Latest reply on Mar 8, 2004 1:53 AM by raffaelecorvino

    Exception in thread "main" java.lang.NoClassDefFoundError

    raffaelecorvino Newbie

      When I runthe Client, it give me this error:
      Exception in thread "main" java.lang.NoClassDefFoundError: /home/raffaele/Documents/esempio1/main/CountClient

      Please,Can Anyone help me???
      Thanks in advance.
      Raffaele.

        • 1. Re: Exception in thread
          raffaelecorvino Newbie

          my deployment files are:
          ejb-jar.xml:
          <?xml version="1.0" encoding="UTF-8" ?>
          <!DOCTYPE ejb-jar (View Source for full doctype...)>
          - <ejb-jar>
          JBoss Hello World Application
          <display-name>Hello World EJB</display-name>
          - <enterprise-beans>
          -
          <ejb-name>HelloWorld</ejb-name>
          prova.main.bean.HelloWorldHome
          prova.main.bean.HelloWorld
          <ejb-class>prova.main.bean.HelloWorldBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>

          </enterprise-beans>
          </ejb-jar>

          jboss.xml:
          <?xml version="1.0" encoding="UTF-8" ?>
          <!DOCTYPE jboss (View Source for full doctype...)>
          -
          - <enterprise-beans>
          -
          <ejb-name>HelloWorld</ejb-name>
          <jndi-name>HelloWorld</jndi-name>
          <configuration-name>Standard Stateless SessionBean</configuration-name>

          </enterprise-beans>

          I'm using Ant to create jar file:
          build.xml:
          <?xml version="1.0" ?>
          - <!-- Esempio: Hello World
          -->
          -






          - <!-- Build classpath
          -->
          -
          -



          - <!-- So that we can get jndi.properties for InitialContext
          -->



          - <!-- Provo a compilare
          -->
          -
          -



          - <!-- Costruisco la dirctory
          -->
          -



          -
          -
          -


          -





          - <!-- Provo ad eseguire
          -->
          -
          -



          -
          -



          -



          -



          when the client run, it give me this error:

          Exception in thread "main" java.lang.NoClassDefFoundError: /home/raffaele/Documents/esempio1/main/CountClient

          Please, can anyone help me?

          • 2. Re: Exception in thread
            Juha Lindfors Master

            make sure CountClient is in your client's classpath

            • 3. Re: Exception in thread
              raffaelecorvino Newbie

              Thanks, I solve this problem!