10 Replies Latest reply on Sep 14, 2001 3:23 PM by Paul Austin

    problem looking up an entity bean from a session bean

    lemasson Newbie

      My trouble is similar to the jsk'problem (Aug 31).
      I deploy a session bean and an entity bean in the same jar file. When the session bean try to look up the entity bean, an error is raised:

      javax.naming.CommunicationException. Root exception is java.net.MalformedURLException: no protocol: Files/jboss-2.2.1/tmp/deploy/Default/myJar.jar/ejb1001.jar

      The code looking for the entity myEntity from the session bean mySessionBean is:

      InitialContext ctx = new InitialContext ();
      Object obj = ctx.lookup(myEntityName) ; // here it doesn't work
      myEntityHome = (myEntityHome)PortableRemoteObject.narrow(obj,myEntityHome.class);

      The XML file ejb-jar.xml seems to be good and contains the ejb-ref part:

      There is no jboss.xml.

      If someone have a solution ...