Hi there!
Last week I update the hibernate.jar from version 3.2 to 3.3.2-GA. Unfortunately, I get an error about class cast and
_$$javassit_ with a super class (First time I use inheritance with hibernate). With hibernate 3.2 everything was working just right.
I have a super class called AFEPlaza with two subclasses: CentroCostoAFEPuesto and ProyectoInstitucionalAFEPuesto.
This is the code line where I get the error:
Code:
return new BigDecimal(((CentroCostoAFEPuesto) this.plaza).getMaxHorasUniv());
This is the error message I get:
Code:
java.lang.ClassCastException: mx.edu.um.afe.model.AFEPlaza_$$_javassist_68 cannot be cast to mx.edu.um.afe.model.CentroCostoAFEPuesto
at mx.edu.um.afe.model.ContratoAFEAlumno.getMaximoHoras(ContratoAFEAlumno.java:260)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
at mx.edu.um.afe.model.ContratoAFEAlumno_$$_javassist_83.getMaximoHoras(ContratoAFEAlumno_$$_javassist_83.java)
at mx.edu.um.afe.service.impl.InformeAFEHorasManagerImpl.calcularBecaAdicional(InformeAFEHorasManagerImpl.java:158)
at mx.edu.um.afe.service.impl.InformeAFEHorasManagerImpl.saveInformeAFEHoras(InformeAFEHorasManagerImpl.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy86.saveInformeAFEHoras(Unknown Source)
at mx.edu.um.afe.webapp.action.InformeAFEHorasAction.save(InformeAFEHorasAction.java:229)
Please, if someone could help me to know what is _$javassist_ and how to handle that kind of classes... Thx!