Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
java.lang.RuntimeException: Failed to invoke public javax.xml.datatype.XMLGregorianCalendar()
Robert James Liguori
Author
Posts: 587
6
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Any ideas how to fix, so I don't get this runtime exception?
public MessageType toAndFromJson(MessageType fmt) { // TO JSON! Gson gson = new Gson(); String jsonFlightData = gson.toJson(fmt); jsonFlightData = jsonFlightData; // FROM JSON! MessageType g = new MessageType(); String s = jsonFlightData; // java.lang.RuntimeException: Failed to invoke public javax.xml.datatype.XMLGregorianCalendar() with no args g = (MessageType) gson.fromJson(s, MessageType.class); return g; }
Campbell Ritchie
Marshal
Posts: 79177
377
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
So where is the XMLGregorianCalendar() call? Is it a constructor call? You haven’t shown it. Also please give the full details of the Exception.
What does it say in the API documentation about such a constructor?
Paul Clapham
Marshal
Posts: 28193
95
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The code in question must be inside the Gson code, which is open-source from Google.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JSON to HASHMAP
how do i solve this error caused due to problem in spring initiation on tomcat
jQuery.getJSON callback not executing
Ajax with java
Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service
More...