9 Replies Latest reply on Apr 24, 2002 3:13 PM by FSYU

    problems when reference external jar deployed on same app se

    CLaus Guttesen Newbie


      Have previously posted same question in forum 'persistence'. Sorry for cross-posting, but this is driving me nuts.

      I've deployed the cabin-example from Enterprise JavaBeans by Mr. Monson-Haefel. Creating the cabin-clients works great. Added the test-data without problems.

      When I execute the travelagent-client I'm able to get the jndi-ref. to the travelagent-bean. But the travelagent-bean can't get a reference to the cabin-bean.

      It gets the initial context,. I accessed the cabin-bean directly by a test-client, and got the desired result.

      Here is the output from jboss:

      [INFO,Default] Got context
      javax.transaction.TransactionRolledbackException: null; nested exception is:

      part of TravelAgentBean.java:

      public String [] listCabins(int shipId, int bedCount) {
      try {
      // Get a naming context
      InitialContext jndiContext = new InitialContext();
      System.out.println("Got context");

      // Get a reference to the CabinBean bean
      Object obj = jndiContext.lookup("java:comp/env/ejb/CabinEJB");
      System.out.println("Got reference");

      CabinHomeRemote home = (CabinHomeRemote)
      PortableRemoteObject.narrow(obj, CabinHomeRemote.class);

      Part of ejb-jar.xml:


      par of jboss.xml:


      When the jndiContext.lookup is empty (jndiContext.lookup("") the bean is able to continue, but does obviously not get any data back, since it doesn't know where to get it.

      I'm completely out of ideas on how to proceed, have even considered trying a commercial app server, just to see whether it's me or not.