问题描述
报错代码如下:在本地可以正常运行放到服务器就报这个错[12-1-813:54:13:378CST]00000046ConnectionEveAJ2CA0056I:连接管理器接收到来自资源jdbc/esgxt的资源适配器的致命连接错误。接收到的异常为com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException:DSRA0080E:AnexceptionwasreceivedbytheDataStoreAdapter.Seeoriginalexceptionmessage:违反协议.:com.ibm.websphere.ce.cm.StaleConnectionException:违反协议DSRA0010E:SQL状态=null,错误代码=17,401:java.sql.SQLException:违反协议DSRA0010E:SQL状态=null,错误代码=17,401[12-1-813:54:13:385CST]00000046SystemOutO[framework]2012-01-0813:54:13,385-com.tmri.acd.action.ACDCORE_KbtjAction-5282518425[WebContainer:6]ERRORcom.tmri.acd.action.ACDCORE_KbtjAction-违反协议DSRA0010E:SQL状态=null,错误代码=17,401[12-1-813:54:13:395CST]00000046LocalTranCoorEWLTC0016E:资源jdbc/esgxt未能完成。异常堆栈跟踪如下:javax.transaction.xa.XAExceptionatcom.ibm.ejs.j2c.LocalTransactionWrapper.rollback(LocalTransactionWrapper.java:393)atcom.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java:1109)atcom.ibm.ws.LocalTransaction.LocalTranCoordImpl.end(LocalTranCoordImpl.java:1301)atcom.ibm.ws.webcontainer.webapp.WebAppTransactionCollaborator.postInvoke(WebAppTransactionCollaborator.java:244)atcom.ibm.ws.wswebcontainer.webapp.WebApp.transactionPostInvoke(WebApp.java:1175)atcom.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:504)atcom.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)atcom.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)atcom.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)atcom.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)atcom.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)atcom.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)atcom.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)atcom.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)atcom.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)atcom.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)atcom.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)atcom.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)atcom.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)Causedby:com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException:DSRA0080E:AnexceptionwasreceivedbytheDataStoreAdapter.Seeoriginalexceptionmessage:违反协议.atcom.ibm.ws.rsadapter.AdapterUtil.translateSQLException(AdapterUtil.java:1118)atcom.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl.rollback(WSRdbSpiLocalTransactionImpl.java:585)atcom.ibm.ejs.j2c.LocalTransactionWrapper.rollback(LocalTransactionWrapper.java:373)...20more
解决方案
解决方案二:
好吧,我是来看楼主的。
解决方案三:
看看你程序中是否有事务控制语句,你的jdbc是用xa方式连接数据库的.如果你打算用数据库控制事务,那么就用普通连接.你的sql中可以有commitrollback等数据库事务命令.如果你打算用was座事务控制,那么就用xa方式连接数据库,你的sql中不能有commitrollback等数据库事务命令.事务有was提供的管理命令做.