hibernate JAP 难题!!

libo_java 2013-01-26 11:01:50
[1/25/13 10:41:51:462 EST] 00000067 SystemErr R net.sf.hibernate.TransactionException: Could not register Synchronization
at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:173)
at net.sf.hibernate.transaction.JTATransactionFactory.beginTransaction(JTATransactionFactory.java:58)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2227)
at com.ibm.epr.taskwrapper.EprActivationTaskWrapper.getFixedPrice(EprActivationTaskWrapper.java:269)
at com.ibm.epr.taskwrapper.EprIndirectActivationCommonTaskWrapper.updateFixedPriceT(EprIndirectActivationCommonTaskWrapper.java:278)
at com.ibm.epr.taskwrapper.EprPriceActivationTaskWrapper.createNewAddendum(EprPriceActivationTaskWrapper.java:683)
at com.ibm.epr.actions.indirectactivation.priceactivation.ActivateAddendumAction.executeTask(ActivateAddendumAction.java:219)
at com.ibm.epr.actions.EprStandardAction.execute(EprStandardAction.java:95)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
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.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.ibm.epr.filter.SecurityFilter.doFilter(SecurityFilter.java:91)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(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.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: javax.transaction.RollbackException: Transaction rolled back
at com.ibm.tx.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:2638)
at com.ibm.tx.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:2617)
at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:169)
... 40 more
[1/25/13 10:41:51:464 EST] 00000067 SystemErr R net.sf.hibernate.TransactionException: Could not register Synchronization
at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:173)
at net.sf.hibernate.transaction.JTATransactionFactory.beginTransaction(JTATransactionFactory.java:58)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2227)
at com.ibm.epr.taskwrapper.EprActivationTaskWrapper.getFixedPrice(EprActivationTaskWrapper.java:269)
at com.ibm.epr.taskwrapper.EprIndirectActivationCommonTaskWrapper.updateFixedPriceT(EprIndirectActivationCommonTaskWrapper.java:278)
at com.ibm.epr.taskwrapper.EprPriceActivationTaskWrapper.createNewAddendum(EprPriceActivationTaskWrapper.java:683)
at com.ibm.epr.actions.indirectactivation.priceactivation.ActivateAddendumAction.executeTask(ActivateAddendumAction.java:219)
at com.ibm.epr.actions.EprStandardAction.execute(EprStandardAction.java:95)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
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.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.ibm.epr.filter.SecurityFilter.doFilter(SecurityFilter.java:91)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(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.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: javax.transaction.RollbackException: Transaction rolled back
at com.ibm.tx.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:2638)
at com.ibm.tx.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:2617)
at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:169)
... 40 more




今天项目总 load 一个比较大的数据,结果就出现了这个错误,是什么原因导致的啊?有人说是达到了JPA事物最大等待时间了,如果是这个问题,应该在哪里设置。



<session-factory>

<!-- properties -->
<property name="hibernate.connection.datasource">jdbc/XXXX</property>
<property name="hibernate.connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property>
<property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<property name="hibernate.connection.schema">XXXX</property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.default_schema">XXXX</property>
<property name="hibernate.connection.pool_size">1</property>
<property name="hibernate.statement_cache.size">25</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
...全文
96 1 点赞 打赏 收藏 举报
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
<property name="hibernate.statement_cache.size">25</property>这个设置大点看下。
  • 打赏
  • 举报
回复
相关推荐
发帖
Web 开发
加入

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2013-01-26 11:01
社区公告
暂无公告