SQL0443在DB2 for iSeries上使用触发器执行Select时出错

SQL0443在DB2 for iSeries上使用触发器执行Select时出错,db2,spring-batch,ibm-midrange,db2-400,Db2,Spring Batch,Ibm Midrange,Db2 400,我在查询db2/as400表时遇到一些问题,我们称之为TAB1。由于在执行正常选择(使用TAB1键)时在该表上添加了一个触发器,因此出现以下错误。在触发器创建之前从未出现过问题 它是使用现代批处理和SpringBatch 2.1.8在批处理应用程序(Java1.6)中执行的查询。没有机会更新库,因为程序很旧,客户不会同意 无论如何,我想说这是一个触发器问题(正如sql代码所说),但是不同的应用程序在TAB1上执行不同的选择,它们从来没有遇到过类似的问题。批处理执行了大约40000次这样的选择,只

我在查询db2/as400表时遇到一些问题,我们称之为TAB1。由于在执行正常选择(使用TAB1键)时在该表上添加了一个触发器,因此出现以下错误。在触发器创建之前从未出现过问题

它是使用现代批处理和SpringBatch 2.1.8在批处理应用程序(Java1.6)中执行的查询。没有机会更新库,因为程序很旧,客户不会同意

无论如何,我想说这是一个触发器问题(正如sql代码所说),但是不同的应用程序在TAB1上执行不同的选择,它们从来没有遇到过类似的问题。批处理执行了大约40000次这样的选择,只有300次失败

有什么想法、提示、建议吗

### Error querying database.  Cause: java.sql.SQLException: [SQL0443] *N *N  
### The error may exist in class path resource [eu/mycompany/el20/dq/as400/dataaccess/mappers/tab1/Tab1Mapper.xml]  
### The error may involve eu.mycompany.el20.dq.as400.dataaccess.persistence.tab.Tab1Mapper.selectByExample-Inline  
### The error occurred while setting parameters  
### SQL: select * from  TAB1 WHERE (  D10_SOC = ? and D10_COD_NDG = ?  and D10_DATE = ? )  
### Cause: java.sql.SQLException: [SQL0443] *N *N  
; uncategorized SQLException for SQL []; SQL state [38501]; error code [-443]; [SQL0443] *N *N; nested exception is java.sql.SQLException: [SQL0443] *N *Nstack trace: org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)  
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)  
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)  
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)  
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)  
com.sun.proxy.$Proxy120.selectList(Unknown Source)  
org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)  
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:124)  
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:90)  
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)  
com.sun.proxy.$Proxy136.selectByExample(Unknown Source)  
eu.mycompany.el20.dq.as400.crud.services.tab.BLSTab1.select(BLSTab1.java:46)  
it.mycompany.xframe.dq.batch.steps.programstep.ProgramExecutor.processRecord(ProgramExecutor.java:544)  
com.ibm.websphere.batch.devframework.steps.technologyadapters.GenericXDBatchStep.processRecord(GenericXDBatchStep.java:263)  
com.ibm.websphere.batch.devframework.steps.technologyadapters.GenericXDBatchStep.processJobStep(GenericXDBatchStep.java:227)  
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl._regularJobBatchLoop(StepManagerImpl.java:1065)  
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl.executeStep(StepManagerImpl.java:390)  
com.ibm.ws.gridcontainer.security.actions.ExecuteStepBatchUserPrivilegedAction.executeAction(ExecuteStepBatchUserPrivilegedAction.java:47)  
com.ibm.ws.gridcontainer.security.AbstractUserPrivilegedAction.runWithoutSecurity(AbstractUserPrivilegedAction.java:66)  
com.ibm.ws.gridcontainer.services.impl.WASRunUnderCredentialServiceImpl.runUnderUserCredential(WASRunUnderCredentialServiceImpl.java:134)  
com.ibm.ws.gridcontainer.services.impl.WASRunUnderCredentialServiceImpl.runActionUnderUserCredential(WASRunUnderCredentialServiceImpl.java:386)  
com.ibm.ws.gridcontainer.batch.impl.JobManagerImpl._sequentialStepScheduling(JobManagerImpl.java:783)  
com.ibm.ws.gridcontainer.batch.impl.JobManagerImpl.executeJob(JobManagerImpl.java:199)  
com.ibm.ws.batch.BatchJobControllerWork._runJob(BatchJobControllerWork.java:435)  
com.ibm.ws.batch.BatchJobControllerWork.run(BatchJobControllerWork.java:241)  
com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:271)  
java.security.AccessController.doPrivileged(AccessController.java:399)  
com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:797)  
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)  
com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)  
java.lang.Thread.run(Thread.java:790)

消息SQL0443的文本为“触发程序或外部例程检测到错误”

我建议查看JDBC连接的主机数据库服务器作业

在IBM i命令行上,运行命令
WRKOBJLCK OBJ()OBJTYPE(*USRPRF)
(其中是用于进行JDBC连接的用户配置文件)并查找名为
qzdasonit
的作业。这些是数据库主机服务器作业

在这些作业中,查看作业日志(或作业日志假脱机文件)以查找SQL0443消息。。。围绕该消息,您应该看到实际错误是什么