Hello World,
I'm getting this exception when I enable lazy loading on SQLMaps and try to access the M side of a 1:M relationship. If I disable lazy loading all runs as expected. Another topic regarding this is http://forum.springframework.org/showthread.php?t=9730 which was solved by adding transactions. As you can see from the stack trace it is hitting the transaction manger by the exception is still thrown. I would greatly appreciate any help someone can give me
The Exception
-----------------
SQLMapCode:java.lang.NullPointerException com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:465) com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:134) com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:107) com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:515) com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:381) com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:359) com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:90) com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:65) com.ibatis.sqlmap.engine.mapping.result.loader.ResultLoader.getResult(ResultLoader.java:65) com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:97) com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.invoke(EnhancedLazyResultLoader.java:80) $java.util.List$$EnhancerByCGLIB$$7e9071fc.iterator(<generated>) pcvm.reservation.domain.logic.ReservationServiceImpl.findReservation(ReservationServiceImpl.java:267) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:118) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:191) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148) $Proxy1.findReservation(Unknown Source)
----------
Transaction PropsCode:<resultMap id="reservationEntity-result" class="reservationEntity"> <result property="reservationNumber" column="CVMB40B_NORESV"/> <result property="rentals" column="CVMB40B_NORESV" select="findRentals"/> [other boring stuff...] </resultMap> <resultMap id="reservationRentalEntity-result" class="reservationRentalEntity"> <result property="vehicleNumber" column="CVMB40C_NOVEH"/> [other boring stuff...] </resultMap> <select id="findReservation" parameterClass="java.util.Map" resultMap="reservationEntity-result"> SELECT * FROM PCVM.CVMB40B WHERE CVMB40B_NORESV = #reservationNumber# </select> <select id="findRentals" parameterClass="java.lang.String" resultMap="reservationRentalEntity-result"> SELECT * FROM PCVM.CVMB40C WHERE CVMB40C_NORENTL = #value# </select>
---------------------
[/code]Code:<prop key="find*">PROPAGATION_REQUIRED</prop>


Reply With Quote