[Logo]
Forums Register Login
java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue
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 ?
Screen-Shot-2013-05-22-at-9.23.01-AM.png
Relationship Diagram
[Thumbnail for Screen-Shot-2013-05-22-at-9.23.01-AM.png]
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.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 3839 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 23, 2018 19:33:05.