0 Replies Latest reply on Sep 5, 2003 8:45 PM by butman

    Cant deploy EAR with WAR talking to EJB with ejb-local-ref i

    butman Newbie

      I have an EAR file.
      It contains an EJB (helloWorldBean.jar)
      and a Servlet in a WAR (helloWorldServlet.war)
      I packaged them in an EAR file with the JAR and WAR
      in the META-INF/lib directory. In the web.xml file of
      the WAR file, I have an local-ejb-ref tag with an
      ejb-link tag. I placed the value
      <ejb-link>META-INF/lib/helloWorldBean.jar#helloWorldEJB</ejb-link>
      in the link since the DTD says the format of this is the
      path to the Bean JAR file relative to the EAR file and the BEAN jar file is in META-INF/lib.

      This works and deploys in WebLogic 8.1

      In JBoss, this does not work. I get a deployment error
      and it says it cannot find ...<ear-file>/META-INF/lib/META-inf/lib/helloWorldBean.jar

      If I change the ejb-link tag to either:
      <ejb-link>helloWorldEJB</ejb-link>
      or
      <ejb-link>helloWorldBean.jar#helloWorldEJB
      </ejb-link>
      it works.

      Thus, WebLogic uses ejb-link to find the Bean jar
      relative to the EAR file.

      It seems JBoss starts looking already in
      META-INF/lib NOT the root of the EAR file as the DTD
      suggests.

      Since, JBoss 3.2.2RC3 came out a week ago, which
      is what I am using, and the forums mentioned that
      a fix was made concerning the handling of the
      <ejb-link> tag in web.xml, I figured that there might
      be a bug and that JBoss does not start looking from
      the EAR file root like WebLogic 8.1 and the DTD
      suggests.

      Can you tell me what is going on?

      The current solution, which I do not like, is to have
      2 versions of web.xml. The one for WebLogic 8.1 has
      META-INF/lib/helloWorldBean.jar#helloWorldEJB in
      the link and the JBoss3.2.2RC3 version has
      helloWorldEJB or helloWorldBean.jar#helloWorldEJB
      in it.

      This is not good because we need to deploy our
      beans in both JBoss and WebLogic.

      Also, web.xml should not need to be different between
      vendors. I would expect only vendor-specific WAR
      file deployment descriptors to be different.

      Also, I did try adding a jboss-web.xml file but that
      did not make any difference at all, same error.

      Thanks,
      Daniel Butman