3 Replies Latest reply on Apr 6, 2002 2:38 PM by jcevans

    Monson-Haefel example with latest JBoss-Tomcat

    jcevans

      I am trying to get the EJB cruise-liner example from
      the book by Monson-Haefel working with jboss-3.0.0beta
      and tomcat-4.0.2. The port for this example is
      described in the online JBoss manual at:
      http://www.jboss.org/online-manual/HTML/ch14.html#d0e12038

      I have gotten to the point of compiling and running
      the clients. To get this far, the changes I have
      had to make for JBoss 3.0 were to (1) change references
      in the build.xml files from ejb.xml to jboss-j2ee.xml
      and to change $JBOSS_HOME to $JBOSS_DIST.

      I am getting the following error:
      sh jbossRunClient.sh com.titan.cabin.Client_1
      /usr/local/pkg/jboss-3.0.0beta/client/jboss-j2ee.jar:/usr/local/pkg/jboss-3.0.0beta/client/jndi.jar:/usr/local/pkg/jboss-3.0.0beta/client/jta-spec1_0_1.jar:/usr/local/pkg/jboss-3.0.0beta/client/jboss-client.jar:/usr/local/pkg/jboss-3.0.0beta/client/jnp-client.jar:.
      javax.naming.NameNotFoundException: comp not bound
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:365)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at com.titan.cabin.Client_1.main(Client_1.java:17)


      What does this mean, and how do I fix it? Thanks.

      Chris Evans

        • 1. Re: Monson-Haefel example with latest JBoss-Tomcat

          I don't recognise this exact error message.

          But there is a fix in CVS (beta2) that allows the
          <ejb-link> to work correctly from this example.

          If I get some spare time, I ought to try this example
          for myself.

          Regards,
          Adrian

          • 2. Re: Monson-Haefel example with latest JBoss-Tomcat
            jcevans

            In the process of setting this up, I made an assumption
            about client JNDI access that turned out to be wrong.
            So now I am getting a different error, but I am not
            entirely clueless about what might be wrong. Thanks.

            • 3. Re: Monson-Haefel example with latest JBoss-Tomcat
              jcevans

              I did now get this example to work. I had assumed that
              JBoss 3.0 would allow lookups in the clients
              in the java:comp/env namespace. That is not right, and
              you do need to change all the jndiContext.lookup()
              arguments in the client Java files, just as described
              in the documentation.

              In jBossRunClient.sh, the jta-spec1_0_1.jar file is
              added to the classpath. This has to be changed for
              3.0 to jbosssx-client.jar.

              I still used the EJB 1.1 version of the M.-H. example,
              but presumably the 2.0 version should work with JBoss 3.
              Anybody tried it?