在调用Mainframe DB2中编写的存储过程XXXX时,我遇到了以下错误。在这个存储过程中,我们有'GRAPHIC'和& 'LONGGRAPHIC'参数,我传递了“java.sql.CHAR”和“java.sql.VARCHAR”类型参数。
INFO: SQLErrorCodes loaded: [DB2, Derby, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
Exception while executing Test Case
org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{call SYSPROC.XXXX(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; nested exception is com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -444, SQLSTATE: 42724, SQLERRMC: XXXX
Caused by: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -444, SQLSTATE: 42724, SQLERRMC: XXXX
at com.ibm.db2.jcc.c.tf.d(tf.java:1396)
at com.ibm.db2.jcc.b.jb.l(jb.java:367)
at com.ibm.db2.jcc.b.jb.e(jb.java:92)
at com.ibm.db2.jcc.b.w.e(w.java:72)
at com.ibm.db2.jcc.b.cc.h(cc.java:203)
at com.ibm.db2.jcc.c.tf.q(tf.java:1363)
at com.ibm.db2.jcc.c.uf.d(uf.java:2388)
at com.ibm.db2.jcc.c.vf.Z(vf.java:159)
at com.ibm.db2.jcc.c.vf.execute(vf.java:142)
at org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:906)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:872)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:904)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:113)
at com.cst.test.common.SPCall.execute(SPCall.java:73)
at com.cst.test.daoLayer.SPTest.testLogic(SPTest.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Failed Test Case Count : 0
答案 0 :(得分:2)
SQL代码-444表示找不到从存储过程调用的外部程序。名称不正确,或程序未正确链接。
此处有更多信息:http://pic.dhe.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2z9.doc.codes/src/tpc/n444.htm