问题描述
异常信息java.lang.IllegalArgumentException:Nostatementspecifiedatorg.springframework.util.Assert.notNull(Assert.java:90)atorg.springframework.jdbc.datasource.DataSourceUtils.applyTransactionTimeout(DataSourceUtils.java:206)atorg.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:803)atworkbench.apps.cc.functions.dataTrans.batch.CustTransService.transAcCustToClNew(CustTransService.java:99)atworkbench.apps.cc.functions.dataTrans.batch.CustTransJobTask.transCust(CustTransJobTask.java:32)atworkbench.apps.cc.functions.dataTrans.batch.CustTransJobTask.run(CustTransJobTask.java:14)方法如下HashMapreturnMap=(HashMap)this.getJdbcTemplate().execute(newCallableStatementCreator(){publicCallableStatementcreateCallableStatement(Connectioncon)throwsSQLException{StringstoredProc="{call"+procedureName+"(?,?,?,?,?)}";//调用的sqlCallableStatementcs=con.prepareCall(storedProc);cs.setDate(1,newjava.sql.Date(DateUtils.getBusinessDate(DataTransConstants.CASETYPEID).getTime()));//设置输入参数的值cs.registerOutParameter(1,Types.INTEGER);cs.registerOutParameter(2,Types.INTEGER);cs.registerOutParameter(3,Types.INTEGER);cs.registerOutParameter(4,Types.INTEGER);returncs;}publicCallableStatementcreateCallableStatement(java.sql.Connectionarg0)throwsSQLException{returnnull;}},newCallableStatementCallback(){publicObjectdoInCallableStatement(CallableStatementcs)throwsSQLException,DataAccessException{cs.execute();HashMaprtMap=newHashMap();rtMap.put("errorCode",newInteger(cs.getInt(1)));rtMap.put("needDeal",newInteger(cs.getInt(2)));rtMap.put("DealedTotal",newInteger(cs.getInt(3)));rtMap.put("failedTotal",newInteger(cs.getInt(4)));returnrtMap;//获取输出参数的值}});HashMapreturnMap=(HashMap)this.getJdbcTemplate().execute(就是个事务报错,一直没找到原因