2017-04-27 413 views
0

我正在使用WAS 8.5.9版本,看起来像一些数据源连接问题,但是当我点击测试连接按钮,在WAS控制台则显示连接fine.But当我运行我的应用程序则抛出错误,并在错误日志它显示以下错误WAS 8.5.9数据源失败...... DSRA0010E:SQL状态= 42601,错误代码= -104在应用程序中获取错误代码

[financing_tools_docgen] [DBConnection] [04/27 14:18:45.759] [ERROR] [Severity 2] [[[email protected]][145681]] getConnection() : Got SQLException :com.ibm.websphere.ce.cm.StaleConnectionException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=SNAPSHOT;MODE, DRIVER=3.57.82 DSRA0010E: SQL State = 42601, Error Code = -104 

在应用程序日志中得到以下错误

[financing_tools_docgen] [DBConnection] [04/27 14:18:43.723] [DEBUG] [Severity 4] [[[email protected]][145681]] Trying to get connection object with ICFS DS=ICFS_IR1T , JNDI value=jdbc/financing_tools_docgen_txtmgr 
[financing_tools_docgen] [DBConnection] [04/27 14:18:45.759] [ERROR] [Severity 2] [[[email protected]][145681]] getConnection() : Got SQLException :com.ibm.websphere.ce.cm.StaleConnectionException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=SNAPSHOT;MODE, DRIVER=3.57.82 DSRA0010E: SQL State = 42601, Error Code = -104 
+0

这个问题看起来与您所看到的问题有关:https://developer.ibm.com/answers/questions/182641/websphere-adapter-for-jdbc-receives-db2-sql-error.html –

回答

0

以下是SQLState 42601的DB2文档,错误代码为-10 4,

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.messages.sql.doc/doc/msql00104n.html

这听起来像一个语法错误,而不是陈旧的连接。我认为应用程序服务器在这里错误分类了它。这将与测试连接操作仍然正常工作相一致,因为可以成功获取连接,但执行带有语法错误的SQL命令时会发生错误。你应该看看正在使用的SQL,看看你能否改正。

相关问题