2 Replies Latest reply on Sep 15, 2005 10:16 PM by A P

    Cannot deploy ear containing wlclient.jar

    David McDonald Newbie

      We have an application that makes remote EJB calls to a WebLogic 8.1 server. The wlclient.jar for WebLogic is contained in the ear and is referenced through the class path entry in the manifest file for the EJB jar. This application works perfectly in WebSphere 5.1, but when we try to deploy it to JBoss 4.0.2 (J2SDK 1.4.2_06, Win2K), we get the following error:

      Initialization failed jboss.j2ee:jndiName=ejb/com/ihcfs/events/EventsAdminHome,service=EJB
      java.lang.NoSuchMethodException: org.jboss.ejb.StatelessSessionContainer.removeHome(javax.ejb.Handle)
      at java.lang.Class.getMethod(Class.java:986)
      at org.jboss.ejb.StatelessSessionContainer.setupHomeMapping(StatelessSessionContainer.java:125)
      at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:153)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:238)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:220)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      I discovered that if I removed all of the javax.* packages from the wlclient.jar, then the application would deploy successfully. Unfortunately when it came time for the container to do a remote lookup of the WebLogic EJB, a different error occurs:

      javax.naming.InvalidNameException: Couldn't resolve initial reference: NameService [Root exception is org.omg.CORBA.ORBPackage.InvalidName]
      at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:50)
      at weblogic.corba.j2ee.naming.ORBHelper.getORBReferenceWithRetry(ORBHelper.java:499)
      at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:465)
      at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:97)
      at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:42)
      at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)

      It appears to me that the wlclient.jar requires its own javax.* packages in order to work correctly. But JBoss seems to be having some class loader issues, even though I have it configured to use a different class loader per ear.

      Just to rule out any problems with the application itself, I did create an empty test ear that included the wlclient.jar, and reproduced the same error (the first error listed above).

      I am very curious to know if others have seen this issue in JBoss, and if anyone has found a work-around for it.


        • 1. Re: Cannot deploy ear containing wlclient.jar
          Marcey Rhyne Newbie

          I have run into a similar issue. I have my own EJBs deployed in a local installation of JBoss, but behind those EJBs is a service layer which calls remote EJBs installed in Weblogic (not sure which version).

          When I DO include wclient.jar in my EAR, the result is that my own (JBoss) EJBs will not deploy and I get the same error you are getting.

          However, if I DO NOT include wclient.jar, then obviously failure occurs when I attempt to get initial context where:
          INITIAL_CONTEXT_FACTORY = "weblogic.jndi.WLInitialContextFactory"

          I believe it comes down to wlclient.jar being seen as overriding JBoss's naming factory, which causes problems with the local EJB deployment. And it may be a matter of WHERE wlclilent.jar gets put in the EAR and some other settings, but I am certainly no expert in that matter!

          Any other ideas? I have seen several posts on other sites as well with this JBoss-Weblogic issue, but so far no real replies.

          • 2. Re: Cannot deploy ear containing wlclient.jar
            A P Newbie

            What are the Class loading differences between libraries that are in a web application web-inf/lib and that are in class-path entry of META-INF/manifest.mf of a ear. I recently developed a web services application with a ejb endpoint.Then packaged it in a ear file with the classpath entry .The problem occured when I placed the weblogic.jar(and other third party jars) in the ear file which my ejb.jar uses as utility jar's. Jboss starts behaving weird.Some of the classes of jboss are overwritten and class cast exception errors started coming up. Overnight I changed the application to a servlet end point and placed all my jars in the WEB-INF/lib then everything started working smooth. Can any body help me , understand what is happening. Why doesn't j2ee have something like META-INF/lib