3 Replies Latest reply on Apr 30, 2002 4:01 AM by mreyes

    javax.naming.NameNotFoundException: interest not bound

    mreyes Newbie

      Following the documentation at :

      http://www.jboss.org/online-manual/HTML/index.html

      I have just setup Jboss 3.0 with Tomcat 4.0.3

      echo $JBOSS_DIST
      /usr/local/jboss-3.0.0RC1_tomcat-4.0.3

      I can start the jboss/tomcat servers without any problems and can access :

      http://172.21.9.78:8082/ - jboss
      http://172.21.9.78:8080/ - tomcat

      All well so far.

      When I attempt to run the interest example I can build/deploy without any problems :

      **********************************************************
      jboss@gandalf2:/org/jboss/examples/build$ java -cp $ANT_HOME/lib/ant.jar -Dant.home=ant org.apache.tools.ant.Main intro-interest-deploy
      Buildfile: build.xml

      validate-servlet:

      validate-jboss:

      fail_if_not_valid:

      init:
      [echo] Using JBoss directory=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3
      [echo] Using base classpath=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-j2ee.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jaas.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jbosssx-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jnp-client.jar:/usr/local/catalina/common/lib/servlet.jar
      [echo] Using Source directory=/org/jboss/examples
      [echo] Using Build directory=/org/jboss/examples/build-examples

      intro-interest-deploy:

      compile:

      ejb-jar:
      [delete] Deleting directory /org/jboss/examples/build-examples/interest/META-INF
      [mkdir] Created dir: /org/jboss/examples/build-examples/interest/META-INF
      [copy] Copying 1 file to /org/jboss/examples/build-examples/interest/META-INF
      [copy] Copying 1 file to /org/jboss/examples/build-examples/interest/META-INF
      [jar] Building jar: /org/jboss/examples/build-examples/interest/interest.jar

      deploy-ejb-jar:
      [copy] Copying 1 file to /usr/local/jboss-3.0.0RC1_tomcat-4.0.3/deploy

      BUILD SUCCESSFUL

      Total time: 1 second
      jboss@gandalf2:/org/jboss/examples/build$
      **********************************************************

      But, when I try and run the client I get the error mentioned in the title of this thread :

      **********************************************************
      jboss@gandalf2:/org/jboss/examples/build$ java -cp $ANT_HOME/lib/ant.jar -Dant.home=ant org.apache.tools.ant.Main intro-interest-client
      Buildfile: build.xml

      validate-servlet:

      validate-jboss:

      fail_if_not_valid:

      init:
      [echo] Using JBoss directory=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3
      [echo] Using base classpath=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-j2ee.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jaas.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jbosssx-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jnp-client.jar:/usr/local/catalina/common/lib/servlet.jar
      [echo] Using Source directory=/org/jboss/examples
      [echo] Using Build directory=/org/jboss/examples/build-examples

      intro-interest-client:

      compile:

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

      BUILD SUCCESSFUL

      Total time: 3 seconds
      jboss@gandalf2:/org/jboss/examples/build$
      **********************************************************

      The Jboss console doesnt display any errors or anything for that matter.

      Does anybody have any suggestions as to the possible cause of this, I have search through the forums here and found a few response to people that have had similar problems, but nothing suggested in previous threads seems to work here.

        • 1. Re: javax.naming.NameNotFoundException: interest not bound
          mreyes Newbie

          One small thing I forgot to mention, I am totally new to jboss/java/web services so if possible use small words and big pictures in your reply :)

          Thanks in advance.

          • 2. Re: javax.naming.NameNotFoundException: interest not bound
            mreyes Newbie

            After some investigation, this is what I have so far.

            It would seem that the auto deployment placed interest.jar into :

            $JBOSS_DIST/deploy

            But it seems that this actually needs to be in :

            $JBOSS_DIST/server/default/deploy/

            When I copied interest.jar into this directory, the Jboss console came to life and displayed the following :

            **********************************************************
            16:10:15,182 INFO [MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/server/default/deploy/interest.jar
            16:10:15,324 INFO [EjbModule] Creating
            16:10:15,358 INFO [EjbModule] Deploying Interest
            16:10:15,459 INFO [EjbModule] Created
            16:10:15,461 INFO [EjbModule] Starting
            16:10:15,583 INFO [EjbModule] Started
            16:10:15,584 INFO [MainDeployer] Successfully completed deployment of package: file:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/server/default/deploy/interest.jar
            **********************************************************

            Which is nice, now when I run :

            java -cp $ANT_HOME/lib/ant.jar:$JBOSS_DIST/lib/commons-logging.jar -Dant.home=ant org.apache.tools.ant.Main intro-interest-client

            I get the following error :

            **********************************************************
            jboss@gandalf2:/org/jboss/examples/build$ java -cp $ANT_HOME/lib/ant.jar:$JBOSS_DIST/lib/commons-logging.jar -Dant.home=ant org.apache.tools.ant.Main intro-interest-client
            Buildfile: build.xml

            validate-servlet:

            validate-jboss:

            fail_if_not_valid:

            init:
            [echo] Using JBoss directory=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3
            [echo] Using base classpath=/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-j2ee.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jaas.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jbosssx-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jboss-client.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/client/jnp-client.jar:/usr/local/catalina/common/lib/servlet.jar
            [echo] Using Source directory=/org/jboss/examples
            [echo] Using Build directory=/org/jboss/examples/build-examples

            intro-interest-client:

            compile:

            interest-client:
            [java] Got context
            [java] Got reference
            [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
            [java] at org.jboss.invocation.MarshalledValueInputStream.(MarshalledValueInputStream.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$(MarshalledValueOutputStream.java:23)
            [java] at org.jboss.invocation.MarshalledValueOutputStream.(MarshalledValueOutputStream.java:25)
            [java] at org.jboss.invocation.MarshalledValue.(MarshalledValue.java:47)
            [java] at org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation.java:317)
            [java] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1262)
            [java] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1243)
            [java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
            [java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java: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(Unknown Source)
            [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
            [java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
            [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
            [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
            [java] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
            [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
            [java] at $Proxy0.create(Unknown Source)
            [java] at org.jboss.docs.interest.InterestClient.main(InterestClient.java:39)
            [java] Java Result: 1

            BUILD SUCCESSFUL

            Total time: 3 seconds
            **********************************************************

            Now that error seems to indicate I have the logging jars missing from my classpath, but if I add these :

            jboss@gandalf2:/org/jboss/examples/build$ echo $CLASSPATH
            :/usr/local/java/lib/tools.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/lib/log4j.jar:/usr/local/jboss-3.0.0RC1_tomcat-4.0.3/lib/commons-logging.jar

            I get the same error, and the Base Classpath section of the output when running the client doesnt change (I have also tried adding these to the -cp when I run the client with the same effect.

            • 3. Re: javax.naming.NameNotFoundException: interest not bound
              mreyes Newbie

              Just incase at some point in the future somebody has the same problem and is searching this forum, the answer to the problem I described (the logging part) can be found at :

              http://jboss.org/forums/thread.jsp?forum=61&thread=14014

              Still not sure why the docs say deploy to :

              $JBOSS_DIST/deploy

              Where in reality it would seem deployment need to go to :

              $JBOSS_DIST/server/default/deploy