May 27 2008

getting a PropertyAccessException?

Tag: Hibernate, JavaYogesh @ 11:37 am

org.hibernate.PropertyAccessException: Null value was assigned to a property of
primitive type setter of XXXXXX

Hibernate internally treats every attribute in VO as OBJECT.

Instead of using primitives directly use the respective wrapper class objects.

example:
instead of using
private int versionNo;
in your VO, use
private java.lang.Integer versionNo;


May 15 2008

Some rows in the table not getting populated - Hibernate

Tag: JavaYogesh @ 7:20 am

While using hibernate, if you see that some rows do not get populated check your database table and make sure that if it has a composite key all the keys are mentioned in your cfg xml. since if it is not the rows having the same data will be ignored.


May 15 2008

“Hibernate Dialect must be explicitly set” exception?

Tag: UncategorizedYogesh @ 7:06 am

check your hibernate xml, if it does not have an entry for dialect add it,

<property name="hibernate.dialect">

org.hibernate.dialect.OracleDialect

</property>