users@jaxb.java.net

ClassCastException when Unmarshalling

From: David Massart <david.massart_at_LONGBOY.EUN.ORG>
Date: Tue, 10 Jun 2003 08:44:22 -0600

Hi There,

I got the following exception when I try to unmarshal a xml document on the Sun One AppServ 7 whereas I have no problem to unmarshal it with a standalone application.

I use JAXB 1.0.1 and JAXB classes are generated with the necessary extension in order to have them serializable.

java.lang.ClassCastException at org.eun.celebrate.xml.ns.root.impl.runtime.AbstractUnmarshallingEventHandlerImpl.spawnChild(AbstractUnmarshallingEventHandlerImpl.java:203)
at org.eun.celebrate.xml.ns.root.impl.runtime.AbstractUnmarshallingEventHandlerImpl.spawnChildFromEnterAttribute(AbstractUnmarshallingEventHandlerImpl.java:224)
at org.eun.celebrate.xml.ns.message_0_1.impl.MessageTypeImpl$Unmarshaller.enterAttribute(MessageTypeImpl.java:463)
at org.eun.celebrate.xml.ns.root.impl.runtime.SAXUnmarshallerHandlerImpl.consumeAttribute(SAXUnmarshallerHandlerImpl.java:397)
at org.eun.celebrate.xml.ns.message_0_1.impl.MessageTypeImpl$Unmarshaller.enterElement(MessageTypeImpl.java:339)
at org.eun.celebrate.xml.ns.root.impl.runtime.SAXUnmarshallerHandlerImpl.startElement(SAXUnmarshallerHandlerImpl.java:116)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.eun.celebrate.xml.ns.root.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:127)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:99)
at org.eun.celebrate.bs.messageBroker.MessageBrokerBean.onMessage(MessageBrokerBean.java:104)
at com.sun.ejb.containers.MessageBeanContainer.onMessage(MessageBeanContainer.java:857)
at com.sun.ejb.containers.MessageBeanListenerConcurrent.onMessage(MessageBeanListenerConcurrent.java:20)
at com.sun.messaging.jmq.jmsclient.ServerSessionRunner.onMessage(ServerSessionRunner.java:139)
at com.sun.messaging.jmq.jmsclient.ServerSessionRunner.run(ServerSessionRunner.java:105)
at com.sun.messaging.jmq.jmsclient.SessionImpl.run(SessionImpl.java:1777)
at com.sun.enterprise.jms.SessionWrapperBase.run(SessionWrapperBase.java:199)
at com.iplanet.ias.ejb.containers.IASServerSessionImpl.run(IASServerSessionImpl.java:191)
at java.lang.Thread.run(Thread.java:536)

Any idea anyone?

Thanks,

David