• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Castor Help with unmarshalling

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic