I have an object with RedemptionPenaltyValue with a property ...
Code:
private double year1Percentage
In the column on the table that this maps to (oracle10g) it is NUMBER(7,3)
I get this exception when the column is null.....
Code:
org.springframework.orm.hibernate3.HibernateSystemException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.hidden.value.RedemptionPenaltyValue.setYear1Percentage; nested exception is org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.hidden.value.RedemptionPenaltyValue.setYear1Percentage
Caused by: org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.hidden.value.RedemptionPenaltyValue.setYear1Percentage
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValuesWithOptimizer(PojoEntityTuplizer.java:215)
at org.hibernate.tuple.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:185)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3232)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:126)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
....<snip/>
I have figured out that if I change the year1Percentage property (and its getters and setters etc) to a java.lang.Double then it works. Any ideas why???
This is a bit annoying as this is existing code that we are converting from JDBC to Hibernate, and I dont really want to go and change all doubles to Doubles etc.
Thanks
Andy.