This week's book giveaway is in the Spring forum.
We're giving away four copies of Java Persistence with Spring Data and Hibernate and have Cătălin Tudose on-line!
See this thread for details.
Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

javax.xml. bind.MarshalException - with linked exception:

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,
I`m getting an error when my client tries to access the service end point class (which is also an Stateless Session Bean - EJB3). My Server codes returns a DTO object, I guess this exception is due to DTO object marshalling to XML. Here is the error given below :


Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSerializer.java:122)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:86)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSupport.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectContent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:531)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:291)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandlerImpl.java:343)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:306)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:80)
... 36 more
Caused by: javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:240)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:255)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:647)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:150)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:317)
... 38 more
Caused by: javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:642)
... 58 more



MainDTO which is getting returned back to client has a Collection of FormatDTO. If I try to remove the FormatDTO in MainDTO to test. Then the same error points to MainDTO. Please provide some suggestions to fix this issue.

cheers
Srinivasulu Genji
 
Srinivas Genji
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JBoss 4.2.2 AS
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic