I've been trying to get an EJB jar file loaded into WebSphere, but every time I get confronted with the same error message on deployment: [15/02/06 08:53:18:876 GMT] 3d83305b ApplicationMg A WSVR0200I: Starting application: IntlHealthcare [15/02/06 08:53:18:985 GMT] 3d83305b EJBContainerI I WSVR0207I: Preparing to start EJB jar: EligabilityEJB.jar [15/02/06 08:53:19:094 GMT] 3d83305b BeanMetaData E CNTR0075E: The user-provided class "com.intl.ecommerce.healthcare.business.eligability.ejb.EligabilityLocal" needed by the EnterpriseBean could not be found or loaded. [15/02/06 08:53:19:126 GMT] 3d83305b EJBContainerI E WSVR0209E: Unable to prepare EJB jar EligabilityEJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl], enterprise bean com.ibm.etools.ejb.impl.SessionImpl(Eligability) (transactionType: Container, sessionType: Stateless) java.lang.NoClassDefFoundError: com/intl/ecommerce/healthcare/business/eligability/bean/EligabilityPolicy at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1753) at java.lang.Class.privateGetPublicMethods(Class.java:1781)
I can see two problems above, and they are related!
The class �EligabilityPolicy� exists in a project utility jar file called EligabilityBusiness.jar
The local interface �EligabilityLocal� has �EligabilityPolicy� as one of its return types. If I change this so the method in question returns a String, deployment is fine. This is going to be down to the way my project utilities are ordered / included in the EAR descriptor, but I really can�t see anything wrong in this respect!
Also, once deployed (with the method returning a String), the WAR client application insists on calling the Bean�s remote interface � the entire application will be running inside the same JVM, so I want to call the Bean�s local interface; the exception stack is: [15/02/06 09:21:25:938 GMT] 6ef77336 SystemErr R java.lang.ClassCastException: cannot cast class com.intl.ecommerce.healthcare.business.eligability.ejb._EligabilityHome_Stub to interface com.intl. ecommerce.healthcare.business.eligability.ejb.EligabilityLocalHome [15/02/06 09:21:25:938 GMT] 6ef77336 SystemErr R at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:409) [15/02/06 09:21:25:938 GMT] 6ef77336 SystemErr R at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:156) [15/02/06 09:21:25:938 GMT] 6ef77336 SystemErr R at com.intl.ecommerce.healthcare.web.eligability.facade.EligabilityFacade.init(EligabilityFacade.java:50)
The code responsible for invoking this is
As you can imagine, changing the jndi name from
throws a NameNotFoundException. Does the jndi name strictly point to the remote interface? If so, how do I get a hold of the Local interface? Many thanks
"AM Sparx", I'm glad you figured out your problem. I must inform you, we don't have many rules around here but our naming policy is one of them. Not complying with the policy will lead to your account becoming locked. This warning hopefully will prevent that from happening, but some action is required on your part.
Please review the policy here and you can change your Publicly Displayed Name here.
A good workman is known by his tools.
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss