Hallo,
ich arbeite an eine Webapplication und bin hier auf ein Problem gestoßen.
Wenn ich ein Objekt mit Hibernate lade, passiert dies innerhalb einer Transaction (begin - commit). Das ist kein Problem.
Wenn ich dann Child Elemente 'lazy' nachlade, scheint das Hibernate anders zu lösen. Die Daten werde galaden, aber dennoch bekomme ich ein Exception:
Code:
Resource jdbc/source-hibernate rolled back in cleanup of unresolved LocalTransactionContainment.
One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.
Der Stack sieht fogendermaßen aus:
Code:
at java.lang.Throwable.<init>(Throwable.java),
at com.ibm.ws.LocalTransaction.RolledbackException.<init>(RolledbackException.java:30),
at com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java:1073),
at com.ibm.ws.webcontainer.webapp.WebAppTransactionCollaborator.postInvoke(WebAppTransactionCollaborator.java:249),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:708),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:253),
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:991),
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:470),
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137),
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177),
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756),
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881),
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473),
at org.apache.jsp._w3template._jspService(w3template.jsp :292),
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89),
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853),
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344),
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669),
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767),
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853),
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110),
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174),
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313),
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116),
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283),
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42),
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:978),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200),
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069),
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274),
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254),
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:309),
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279),
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482),
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507),
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740),
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853),
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110),
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174),
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313),
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116),
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283),
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42),
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40),
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76),
at com.ibm.web.test.HibernateFilter.doFilter(HibernateFilter.java:47),
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132),
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71),
at com.ibm.igf400.sdk.web.servlets.PageHistoryFilter.doFilter(PageHistoryFilter.java:48),
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132),
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564),
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200),
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119),
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276),
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71),
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116),
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186),
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334),
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56),
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618),
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443),
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)
Hat jemand eine Idee, wie ich das lösen kann, ohne auf lazy fetching zu verzichten?
Danke & Gruss
fr.