NUTZ版本: 1.r.56 , druid : 1.0.14
CaseMessage=A statement attempted to return a result set in executeBatch().
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:94)
at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:316)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:38)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:239)
at org.nutz.dao.impl.DaoSupport$DaoExec.run(DaoSupport.java:306)
at org.nutz.trans.Trans.exec(Trans.java:174)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:276)
at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:50)
at org.nutz.dao.impl.NutDao.fastInsert(NutDao.java:202)
at module.contract.service.ContractService.addContract(ContractService.java:77)
at module.contract.service.ContractService$$NUTZAOP._aop_invoke(ContractService.java:1)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at module.contract.service.ContractService$$NUTZAOP.addContract(ContractService.java:1)
at module.contract.ContractAction.addContract(ContractAction.java:69)
at module.contract.ContractAction$$NUTZAOP._aop_invoke(ContractAction.java:2)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at com.skytech.frame.aop.BasicAop.filter(BasicAop.java:25)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at module.contract.ContractAction$$NUTZAOP.addContract(ContractAction.java:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:25)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:196)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.BatchUpdateException: A statement attempted to return a result set in executeBatch().
at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:559)
at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:282)
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:82)
... 58 more
问答
1.r.56 批处理插入报A statement attempted to return a result set in executeBatch()
标签:
无
4 回复
数据库版本:sqlserver 2008 r2 , 驱动版本 : net.sourceforge.jtds 1.3.1
tran : org.nutz.aop.interceptor.TransactionInterceptor
@Aop("tran")
public void addContract(ContractReq cReq) {
Con_Contract contract = cReq.getContract();
contract = dao.insert(contract);
List<Con_Order> orders = cReq.getOrders();
orders = dao.insert(orders);
List<Con_Pro_Value> properties = cReq.getProperties();
dao.fastInsert(properties);
}
本地test已pass,等待楼主的本地测试ok后提交到github
来自炫酷的 NutzCN
添加回复
请先登陆