I am using 2 .ear files. One file contains the EJBs and the other .ear file contains the application that calls the EJBs in the other .ear file. now the problem is that when i deploy the 2 .ear files on different machines and run the application it works fine but when i deploy the 2 .ear files on the same machine it throws a class cast exception . please help .. stuck with this problem for too long ... any suggestions welcome ... the stack trace is provided below:

ava.lang.ClassCastException: amdocs.oms.api._NegotiationAPIsInterface_Stub
at com.amdocs.css.sbcls.order.offer.dl.LSCheckCustomerEligibilitySrv.doExecute(LSCheckCustomerEligibilitySrv.java:213)
at com.amdocs.css.core.infra.dl.AbstractService.execute(AbstractService.java:63)
at com.amdocs.css.oms.infra.dl.AbstractOmsRmiDAO.callService(AbstractOmsRmiDAO.java:113)
at com.amdocs.css.oms.product.dl.OmsNegotiateDAOImpl.checkCustomerEligibility(OmsNegotiateDAOImpl.java:69)
at com.amdocs.css.core.order.ejb.CheckCustomerEligibilityBO.doAction(CheckCustomerEligibilityBO.java:85)

please HELP!!!!!!!

11 Years
Discussion Span
Last Post by jwenting

You don't deploy the stubs to the application server, it generates them as needed.
You're getting errors because the stubs you're supplying don't match those that are generated on the fly.
The problem here is most likely a classloader issue.



i get your point .. but the stubs are same .. is this because i have used multiple classloaders for separate application.... coz as i said it works fine when i deploy one ear file on a separate machine .. but throws an exception when on the same machine ...

is there a workaround for this ... i know i can change the classloader settings in websphere .. but i cant do that as it affects my calling application ...

is there some other alternative ... thanx for your help


Don't put the stubs in the ear when putting them on the server they're local to.
I think that's all you need to do really, and of course make sure your deployment descriptors are correct.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.