Announcement Announcement Module
Collapse
No announcement yet.
lazy exception using spring framework 3, hibernate and websphere transaction manager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • lazy exception using spring framework 3, hibernate and websphere transaction manager

    i am just upgrading my spring framework to spring 3.1.1 and i am using websphere transaction manager. when i was trying to access a model which is declared as lazy i got the following error:

    [1/15/13 14:30:46:148 WIT] 00000021 LazyInitializ E org.hibernate.LazyInitializationException could not initialize proxy - no Session org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initia lize(AbstractLazyInitializer.java:57) at org.hibernate.proxy.AbstractLazyInitializer.getImp lementation(AbstractLazyInitializer.java:111) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitialize r.invoke(CGLIBLazyInitializer.java:150) at com.aprisma.product.gcm.common.model.spi.gie.Menu$ $EnhancerByCGLIB$$ebdf1c09.getName() at com.aprisma.product.gcm.service.integration.impl.S ecurityServiceImpl.getMenuTree(SecurityServiceImpl .java:312) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:183) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :150) at org.springframework.transaction.interceptor.Transa ctionInterceptor$1.doInTransaction(TransactionInte rceptor.java:132) at org.springframework.transaction.jta.WebSphereUowTr ansactionManager$UOWActionAdapter.run(WebSphereUow TransactionManager.java:337) at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWMa nagerImpl.java:1067) at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManag erImpl.java:628) at org.springframework.transaction.jta.WebSphereUowTr ansactionManager.execute(WebSphereUowTransactionMa nager.java:281) at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:127) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202) at $Proxy1104.getMenuTree(Unknown Source) at com.aprisma.product.gcm.service.impl.LoginServiceI mpl.getMenuTree(LoginServiceImpl.java:279) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:183) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :150) at org.springframework.transaction.interceptor.Transa ctionInterceptor$1.doInTransaction(TransactionInte rceptor.java:132) at org.springframework.transaction.jta.WebSphereUowTr ansactionManager$UOWActionAdapter.run(WebSphereUow TransactionManager.java:337) at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWMa nagerImpl.java:1067) at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManag erImpl.java:628) at org.springframework.transaction.jta.WebSphereUowTr ansactionManager.execute(WebSphereUowTransactionMa nager.java:281) at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:127) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202) at $Proxy1335.getMenuTree(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at com.aprisma.component.esm.utils.CallUtils.springCa ll1(CallUtils.java:452) at com.aprisma.component.esm.utils.CallUtils.springCa ll2(CallUtils.java:465) at com.aprisma.component.esm.utils.CallUtils.springCa ll(CallUtils.java:413) at com.aprisma.component.esm.utils.CallUtils.call(Cal lUtils.java:777) at com.aprisma.component.esm.delegate.BusinessObjectF actory.callBusinessObject(BusinessObjectFactory.ja va:275) at com.aprisma.component.web2.service.CallBOService.c allService(CallBOService.java:9) at com.aprisma.product.gcm.retail.web.mvc.AbstractCon troller.callService(AbstractController.java:45) at com.aprisma.product.gcm.retail.web.mvc.customer.Lo ginController.prepareMenuList(LoginController.java :376) at com.aprisma.product.gcm.retail.web.mvc.customer.Lo ginController.login(LoginController.java:215) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.springframework.web.bind.annotation.support.Ha ndlerMethodInvoker.invokeHandlerMethod(HandlerMeth odInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.invokeHandlerMethod(An notationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.handle(AnnotationMetho dHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923) at com.aprisma.component.web2.servlet.CustomDispatche rServlet.doDispatch(CustomDispatcherServlet.java:1 7) at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet .java:738) at javax.servlet.http.HttpServlet.service(HttpServlet .java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1597) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:131) at com.aprisma.component.web.filters.UserContextFilte r.doFilterInternal(UserContextFilter.java) at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWrapper.java:188) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:116) at com.aprisma.component.web.filters.InputSanitationF ilter.doFilter(InputSanitationFilter.java) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWrapper.java:188) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:116) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.java:77) at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager.java:908) at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:934) at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:502) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl .handleRequest(ServletWrapperImpl.java:179) at com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletWrapper.java:91) at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:864) at com.ibm.ws.webcontainer.WSWebContainer.handleReque st(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java:557) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java:607) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java:984) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.run(WorkQueueManager.java:1069) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1604)

    The problem only occured when i am using websphere transaction manager, if i am using weblogic transaction manager it works fine. I have tried to search for the same problem but it seems like no one had the same problem with me. So, i would like to ask if anyone ever faced the same problem? is there any solution for this?

    thank you, robin
Working...
X