File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue" Watch "java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue" New topic
Author

java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue

kaleeswaran Gounder
Greenhorn

Joined: Jun 07, 2011
Posts: 4
I am having an object called Customer, It will have a relationship with address object (one-to-one relation) and Tickets object (one-to-many relation). [Each customer can have many tickets]. And Each ticket will have a payment object (One-to-one relation). I specified the relation in hibernate annotation.

I am getting the below error when executing the test,



My Application code is

My objects, Customer :



Address :



Tickets :



Payment :




Hibernate Configuration is :




Where am i wrong in this code ?



[Thumbnail for Screen Shot 2013-05-22 at 9.23.01 AM.png]

kaleeswaran Gounder
Greenhorn

Joined: Jun 07, 2011
Posts: 4
I found the answer, The mistake is on the below line of Payment POJO.

@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "tickets"))

Here I specified like value = "tickets" which is invalid in this mapping. I have to specify like value = "ticket". This fixed it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue
 
Similar Threads
Hibernate: schema export unsuccessful java.sql.SQLTransientConnectionException: java.net.ConnectExce
Hibernate mapping
what is the Use of implementing serilizable in below Class
Developing SOAP Web Service.
java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails