aspose file tools*
The moose likes Other Open Source Projects and the fly likes Castor Help with unmarshalling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Castor Help with unmarshalling" Watch "Castor Help with unmarshalling" New topic
Author

Castor Help with unmarshalling

Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
HI,

I am new to Castor and trying the example "http://www.ibm.com/developerworks/xml/library/x-xjavacastor3/". I created a web application and inside have a package as specified in the example and put all the files, Author.java, Book.java, BookMapUnmarshaller.java, book-mapping.xml, book.xml. I made a small change in book.xml to match my xml struture and when I run the file, BookMapUnmarshaller.java, I get the error

Book ISBN: null
Book Title: null
null
java.lang.NullPointerException
at javaapplication1.BookMapUnmarshaller.main(BookMapUnmarshaller.java:26)

Author.java

Book.java

BookMapUnmarshaller.java

book.xml
book-mapping.xml
Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
Please help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Castor Help with unmarshalling
 
Similar Threads
Castor not unmarshalling
Castor Unmarshalling Error
problem with loading mapping.xml
Passing Set<java.lang.Object> and List<java.lang.Object> in Axis 2.0
org.hibernate.AnnotationException: mappedBy reference an unknown target entity property