Hi
i m getting NUll pointer Exception while inserting null value to Boolean field of place in one-many relation . the following is the stack trace,
i m using database:Oracle9.2.
DEPOSIT_YN VARCHAR2(1 BYTE), is field in Database.
in pojo it is Boolean class Object.
plz help me.
Country.hbm.xml
<set name="places" inverse="true" cascade="all-delete-orphan" lazy="false">
<key>
<column name="ID" length="12" not-null="true" unique="true"/>
</key>
<one-to-many class="temp.Place"/>
</set>
place.hbm.xml
<property name="DepositYn" type="yes_no">
<column name="DEPOSIT_YN" length="1" />
</property>
Caused by: java.lang.NullPointerException
at org.hibernate.type.PrimitiveType.toString(PrimitiveType.java:15)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:87)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:60)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1826)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1803)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2059)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2427)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
|