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 Web Services and the fly likes JAXB Error 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 » Java » Web Services
Bookmark "JAXB Error" Watch "JAXB Error" New topic
Author

JAXB Error

ryan bohnert
Greenhorn

Joined: Feb 27, 2008
Posts: 19
I am trying to marshal an object and it's throwing the following error.
class com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException [Ljava.lang.StackTraceElement;@c68c3 2 counts of IllegalAnnotationExceptions null.

The line thowing the error is this
JAXBContext context = JAXBContext.newInstance(Resync.class);


I have googled this error and some post say i need an empty constructor to fix this. I have tried several things and nothing seems to work. Any help is appreciated.

thanks

Main Class Snippet




Resync Class
ryan bohnert
Greenhorn

Joined: Feb 27, 2008
Posts: 19
the solution to this problem is in the Resync class

add this line of code above both get Methods for XMLGregorian Calendar fields

@XmlSchemaType(name = "dateTime")
public XMLGregorianCalendar getResyncStartDateTime().....


@XmlSchemaType(name = "dateTime")
public XMLGregorianCalendar getResyncEndDateTime()....
 
wood burning stoves
 
subject: JAXB Error
 
Similar Threads
jaxb-XSD issue, pls help
Jaxb2. 0 - How to display +00:00 instead of Z in timezone info ?
xml date conversion all date conversions
How to add JAXB customization to a particular element of an xsd?
How to Convert String "Friday, 27 January 2012" into the Date format.