5 Replies Latest reply on Apr 17, 2002 3:58 PM by Los Morales

    Running document example application on JBoss3.0.0RC1

    Los Morales Newbie

      Hi,

      I downloaded the documentation example source code and tried to run the first example (Interest EJB) with JBoss 3.0.0RC1 but encountered a small problem. When trying to run the client application to test if the Interest EJB works using the ant script, I keep getting this error:

      ///////////////////////////////////////////
      init:
      [echo] Using JBoss directory=C:\jboss-3.0.0RC1
      [echo] Using base classpath=C:\jboss-3.0.0RC1\client\jboss-j2ee.jar;C:\jbos
      s-3.0.0RC1\client\jaas.jar;C:\jboss-3.0.0RC1\client\jbosssx-client.jar;C:\jboss-
      3.0.0RC1\client\jboss-client.jar;C:\jboss-3.0.0RC1\client\jnp-client.jar;C:\Docu
      ments and Settings\Administrator\Desktop\test\workspace\ProjectTEST\COULD_NOT_FI
      ND_SERVLET_JAR
      [echo] Using Source directory=C:\Documents and Settings\Administrator\Deskt
      op\test\workspace\ProjectTEST
      [echo] Using Build directory=C:\Documents and Settings\Administrator\Deskto
      p\test\workspace\ProjectTEST/build-examples

      intro-interest-client:

      compile:

      interest-client:
      [java] Got context
      [java] javax.naming.NameNotFoundException: interest not bound

      BUILD SUCCESSFUL

      Total time: 8 seconds
      ////////////////////////////////////////////////////

      For some reason, the Interest EJBs were not recognized by JBoss. I tried restarting the container and redeploying but to no avail. I checked the interest.jar file to make sure both ejb-jar.xml and jboss.xml were properly placed and had the correct contents (in this case, jboss.xml had <jndi-name>interest/Interest</jndi-name> and in which the client app referred to). But for some reason, I keep getting the same error.

      Does anyone know what might be the problem or how to investigate an issue like this? All of the source code is straight from the download and it compiles via ant just fine.

      thanks

      -los

        • 1. Re: Running document example application on JBoss3.0.0RC1
          Los Morales Newbie

          here's an update

          I switched containers (from Jboss 3.0.0RC1 to 2.4.5.RC1) and the example application worked just fine. I can even see the console for 2.4.5.RC1 display the deployer info. So I don't know if i need to do something extra for 3.0.0RC1 in order to deploy or something else.

          thanks.

          -los

          • 2. Re: Running document example application on JBoss3.0.0RC1
            Los Morales Newbie

            I fixed the problem. the jar file should be in the directory jboss3.0.0RC1\server\default\deploy instead of jboss3.0.0RC1\deploy.

            However, I encountered a problem running the client app. Its giving me:
            /////////////////////////////////////////////
            interest-client:
            [java] Got context
            [java] Got reference
            [java] java.lang.NoClassDefFoundError: org/jboss/logging/Logger
            [java] at org.jboss.invocation.MarshalledValueInputStream.(Mars
            halledValueInputStream.java:25)
            [java] at java.lang.Class.forName0(Native Method)
            [java] at java.lang.Class.forName(Class.java:130)
            [java] at org.jboss.invocation.MarshalledValueOutputStream.class$(Marsh
            alledValueOutputStream.java:23)
            [java] at org.jboss.invocation.MarshalledValueOutputStream.(Mar
            shalledValueOutputStream.java:25)
            [java] at org.jboss.invocation.MarshalledValue.(MarshalledValue.j
            ava:47)
            [java] at org.jboss.invocation.MarshalledInvocation.writeExternal(Marsh
            alledInvocation.java:317)
            [java] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStre
            am.java:1262)
            [java] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputSt
            ream.java:1243)
            [java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.ja
            va:1052)
            [java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.jav
            a:278)
            [java] at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
            [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)
            [java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unkn
            own Source)
            [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(
            JRMPInvokerProxy.java:128)
            [java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterce
            ptor.java:108)
            [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInte
            rceptor.java:73)
            [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityIntercepto
            r.java:76)
            [java] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.ja
            va:185)
            [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:9
            6)
            [java] at $Proxy0.create(Unknown Source)
            [java] at org.jboss.docs.interest.InterestClient.main(InterestClient.ja
            va:46)
            [java] Exception in thread "main"
            [java] Java Result: 1

            BUILD SUCCESSFUL

            //////////////////////////////////////////////
            I don't know why a NoClassDefFoundError: org/jboss/logging/Logger exception occured since its not defined anywhere in the code. Could it be that JBoss3.0.0RC1 uses a different directory for logging than its 2.x predecessors?

            Any help will be appreciated. Thanks!

            -los

            • 3. Re: Running document example application on JBoss3.0.0RC1
              Adrian Brock Master

              You'll find the class in jboss-common-client.jar

              Regards,
              Adrian

              • 4. Re: Running document example application on JBoss3.0.0RC1
                Los Morales Newbie

                Hi Adrian,

                Thanks for the tip. The jar was in JBoss3.0.0RC1\client.

                Now my stupid question is, what am I suppose to do with it? I tried copying it to the JBoss3.0.0RC1\lib and JBoss3.0.0RC1\server\default\deploy directory but I can't get the container to recognize this class.

                -los

                • 5. Re: Running document example application on JBoss3.0.0RC1
                  Los Morales Newbie

                  never mind about previous post... I figured it out. I changed the build script to look for jboss-common-client.jar and log4j.jar in the client directories and it worked.

                  I guess the 2.x versions already included them in jboss-client.jar so I did not need to worry about them.

                  -los