|
Hello everybody,
I have strange problem with hibernate, maybe it's easy to solve, but I don't have any idea how. Sometimes when I retrieve values from DB through hibernate I got PropertyValueException. Here is the log :
Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.test.jaxb.impl.ChangeRequestItemImpl.amendmentText
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:163)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:190)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:70)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:39)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:656)
at org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:832)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:822)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:779)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at com.test.ChangeRequestService.getChangeRequestList(ChangeRequestService.java:831)
What is the strange for me, that this error occurs when reading data from DB ( see the functions - getChnangeRequestList ) and in DB are all datas correct.
Maybe this is result of previous error and the hibernate session hasn't been correctly closed, but I'm not sure if my hypothesis is correct.
Please if anybode has some idea, help me.
Thank you very much.
John
|