Cannot deploy ear containing wlclient.jar
dmcdonald Aug 1, 2005 12:21 PMWe 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.
Thanks.