You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Patrice DUROUX <pa...@igh.cnrs.fr> on 2018/01/16 17:32:27 UTC

trouble with mapping

Dear OpenJPA dev,

I am facing a runtime error with OpenJPA 2.4.2 used in a large project that I cannot solve
(unless may be by changing again the mapping).
So to help to debug, I have been able to reproduce the case in the smaller project
attached to this email.
To summarize, its mapping specifies an embeddable having a many-to-one
relation to an entity that has also inheritance.
OpenJPA is able to read persisted entities but is not able to persist one.

The following exception is thrown at runtime:
Caused by: java.lang.NullPointerException
    at org.apache.openjpa.jdbc.sql.SecondaryRow.delayForeignKey (SecondaryRow.java:96)
    at org.apache.openjpa.jdbc.sql.SecondaryRow.setForeignKey (SecondaryRow.java:63)
    at org.apache.openjpa.jdbc.meta.ValueMappingImpl.setForeignKey (ValueMappingImpl.java:337)
[...]

Many thanks for your consideration or any help.

Regards,
Patrice