This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes UnmarshalException: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "UnmarshalException:" Watch "UnmarshalException:" New topic
Author

UnmarshalException:

Prasath Premkumar
Ranch Hand

Joined: Nov 13, 2008
Posts: 43
hi,

I validated my schema & xml in JAXP. its validated fine. I created the object model in JAXB using xjc command & wn i try to run run the program in throws

javax.xml.bind.UnmarshalException: unexpected element{} exception.

It is complaining abt FIXadapter2 element which is defined in the schema as

<xsd:element name="FIXadaptor2">

<xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<jxb:class name="FIXadaptor2"/>
</xsd:appinfo>
</xsd:annotation>

<xsd:sequence>
.....
.....
</FIXadapter2>

the exceptin is :
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"FIXadaptor2"). Expected elements are (none)


Can anyone please help me???

Thanks in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

FIXadapter2 or FIXadaptor2?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UnmarshalException:
 
Similar Threads
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"AirAvailabilityRS")
xjc:superClass limitation in JAXB
Error creatin Top down web service with Eclipse Helios
bind data type XMLGregorianCalendar to Calendar
JaxB Compile Error: Failed to read imported schema document