wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes ClassCastException with EJB access ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ClassCastException with EJB access ..." Watch "ClassCastException with EJB access ..." New topic
Author

ClassCastException with EJB access ...

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

Environment
------------
WSAD 5.1.2
AXIS 1.2 RC2 on both server and client
WebSphere Application Server 5.0

I have deployed an EJB using WSAD 5.1.2's WebSphere 5.0 Test Environment and exposed it as web service using AXIS 1.2 RC2 on the server side.

I am able to test and run the ejb using WSAD's Universal Test Client but when I write a web service client program that uses AXIS 1.2 RC2 generated stubs I am getting below error:


faultSubcode:
faultString: java.lang.ClassCastException: cannot cast class com.ram.engine.ejb._DCSummaryWSHome_Stub to interface com.ram.engine.ejb.DCPlanListWSHome
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException: cannot cast class com.ram.engine.ejb._DCSummaryWSHome_Stub to interface com.ram.engine.ejb.DCPlanListWSHome
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:173)
at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
at org.apache.axis.client.Call.invoke(Call.java:2702)
at org.apache.axis.client.Call.invoke(Call.java:2378)
at org.apache.axis.client.Call.invoke(Call.java:2301)
at org.apache.axis.client.Call.invoke(Call.java:1758)
at client.irsc.bluestart.DCPlanListWSBindingStub.getDCPlanList(DCPlanListWSBindingStub.java:178)
at client.irsc.bluestart.IrscDcPlanListWsClient.query(IrscDcPlanListWsClient.java:36)
at client.irsc.bluestart.IrscDcPlanListWsClient.main(IrscDcPlanListWsClient.java:55)

{http://xml.apache.org/axis/}hostname:hyddl0337

java.lang.ClassCastException: cannot cast class com.ram.engine.ejb._DCSummaryWSHome_Stub to interface com.ram.engine.ejb.DCPlanListWSHome
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:173)
at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
at org.apache.axis.client.Call.invoke(Call.java:2702)
at org.apache.axis.client.Call.invoke(Call.java:2378)
at org.apache.axis.client.Call.invoke(Call.java:2301)
at org.apache.axis.client.Call.invoke(Call.java:1758)
at client.irsc.bluestart.DCPlanListWSBindingStub.getDCPlanList(DCPlanListWSBindingStub.java:178)
at client.irsc.bluestart.IrscDcPlanListWsClient.query(IrscDcPlanListWsClient.java:36)
at client.irsc.bluestart.IrscDcPlanListWsClient.main(IrscDcPlanListWsClient.java:55)




Can anyone please tell what is this error occurring and how to solve it ?




Thanks & Regards,
Kumar.


RR Kumaran
SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassCastException with EJB access ...