NutzCN Logo
问答 更新数据库记录,bean 定义的字段是int 类型 , 数据库类型也是int(10) , 但是 update(Bean) 却报错变成了 false
发布于 2155天前 作者 hui453694187 1920 次浏览 复制 上一个帖子 下一个帖子
标签: ssdb

** InvoiceMachine invoiceMachine = dao().fetch(InvoiceMachine.class, Cnd.where("machineId", "=", machine.getId()));
if (invoiceMachine == null) {
invoiceMachine = new InvoiceMachine();
invoiceMachine.setHeadLetter(headLetter);
invoiceMachine.setBeginNum(firstNum);
invoiceMachine.setEndNum(lastNum);
invoiceMachine.setCount(0);
invoiceMachine.setOperatorID(operatorID);
invoiceMachine.setMachineIp(machine.getIp());
invoiceMachine.setMachineId(machine.getId());
invoiceMachine.setMcStatus(InvoiceMachine.MC_STATUS.NORMAL.getIndex());
dao().insert(invoiceMachine);
} else {
String oldHeadLetter = invoiceMachine.getHeadLetter();
reloadLog.setHeadLetter(oldHeadLetter);//原发票字母开发
reloadLog.setBeginNum(invoiceMachine.getBeginNum());
reloadLog.setEndNum(invoiceMachine.getEndNum());
reloadLog.setOldIndex(invoiceMachine.getCount());
//ip 地址
reloadLog.setMachineIp(invoiceMachine.getMachineIp());
reloadLog.setDescribe("原发票号段:" + oldHeadLetter + reloadLog.getBeginNum() + "--" + oldHeadLetter + reloadLog.getEndNum() + ",已经打印到第" + (invoiceMachine.getCount()) + "张");

                invoiceMachine.setHeadLetter(headLetter);//新的开头字母
                invoiceMachine.setBeginNum(firstNum);
                invoiceMachine.setEndNum(lastNum);
                invoiceMachine.setOperatorID(operatorID);
                invoiceMachine.setCount(0);
                invoiceMachine.setMachineIp(machine.getIp());
                invoiceMachine.setMcStatus(InvoiceMachine.MC_STATUS.NORMAL.getIndex());
                log.info("发票数据:"+invoiceMachine.toString());
                dao().update(invoiceMachine);**
  For example:> "UPDATE t_hospital_invoice_machine SET headLetter='JR',beginNum='00000023',endNum='00000456',count=0,machineId=8,machineIp='192.168.31.117',operatorID='T00001',mcStatus=0,autoPrint=false,mcErrorInfo='客户端打印发票异常===发票号:[AJ00000023]-----客户端反馈异常信息:status[-1]-msg[打印发票抛出异常]',createAt='2018-03-12 17:50:34',last_update_time='2018-12-20 17:14:01',org_code='HKUSZH'  WHERE id=4"
2018-12-21 10:28:31,882 [http-bio-8080-exec-1] DEBUG com.mchange.v2.c3p0.impl.NewPooledConnection - com.mchange.v2.c3p0.impl.NewPooledConnection@3f3c6fe5 handling a throwable.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
	at com.mysql.jdbc.Util.getInstance(Util.java:383)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1023)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:997)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:983)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:928)
	at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:5078)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:134)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
	at org.nutz.dao.impl.NutDao.update(NutDao.java:267)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule.reload(InvoicePrintModule.java:820)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule$FM$reload$6b34e29d0a6ae29b409d3fbb7059cc01.invoke(InvoicePrintModule.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	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)
org.nutz.dao.DaoException: org.nutz.castor.FailToCastObjectException: Fail to cast 'false' to <int>
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:139)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)	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:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.nutz.dao.impl.NutDao.update(NutDao.java:267)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule.reload(InvoicePrintModule.java:820)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule$FM$reload$6b34e29d0a6ae29b409d3fbb7059cc01.invoke(InvoicePrintModule.java)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.liqi.health.cloudhospital.system.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at java.lang.Thread.run(Thread.java:745)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
2018-12-21 10:28:31,883 [http-bio-8080-exec-1] DEBUG com.mchange.v2.sql.SqlUtils - Attempted to convert SQLException to SQLException. Leaving it alone. [SQLState: 08003; errorCode: 0]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at com.liqi.health.cloudhospital.system.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

	at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at com.mysql.jdbc.Util.getInstance(Util.java:383)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1023)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:997)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:983)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:928)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:5078)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:134)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
	at java.lang.Thread.run(Thread.java:745)
	at org.nutz.dao.impl.NutDao.update(NutDao.java:267)
Caused by: org.nutz.castor.FailToCastObjectException: Fail to cast 'false' to <int>
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:45)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule.reload(InvoicePrintModule.java:820)
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:19)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule$FM$reload$6b34e29d0a6ae29b409d3fbb7059cc01.invoke(InvoicePrintModule.java)
	at org.nutz.castor.Castors.cast(Castors.java:252)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.castor.Castors.castTo(Castors.java:316)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:	at org.nutz.dao.jdbc.Jdbcs$Adaptor$4.set(Jdbcs.java:339)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:306)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:90)
44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	... 57 more
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
Caused by: java.lang.NumberFormatException: For input string: "false"
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at java.lang.Integer.parseInt(Integer.java:580)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at java.lang.Integer.valueOf(Integer.java:740)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.castor.castor.String2Integer.valueOf(String2Integer.java:15)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.nutz.castor.castor.String2Integer.valueOf(String2Integer.java:5)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:39)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	... 69 more
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.liqi.health.cloudhospital.system.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
	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:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
2018-12-21 10:28:31,883 [http-bio-8080-exec-1] DEBUG com.mchange.v2.c3p0.impl.DefaultConnectionTester - Testing a Connection in response to an Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
	at com.mysql.jdbc.Util.getInstance(Util.java:383)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1023)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:997)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:983)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:928)
	at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:5078)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:134)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
	at org.nutz.dao.impl.NutDao.update(NutDao.java:267)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule.reload(InvoicePrintModule.java:820)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule$FM$reload$6b34e29d0a6ae29b409d3fbb7059cc01.invoke(InvoicePrintModule.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	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:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.liqi.health.cloudhospital.system.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
	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:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
2018-12-21 10:28:31,884 [http-bio-8080-exec-1] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - trace com.mchange.v2.resourcepool.BasicResourcePool@5f1a9fe1 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@5188e07e)
2018-12-21 10:28:31,884 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#3] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@3f3c6fe5] on CHECKIN.
2018-12-21 10:28:31,885 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#3] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@3f3c6fe5] on CHECKIN has SUCCEEDED.
2018-12-21 10:28:31,887 [http-bio-8080-exec-1] ERROR com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule - 填入发票信息失败
org.nutz.dao.DaoException: org.nutz.castor.FailToCastObjectException: Fail to cast 'false' to <int>
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
	at org.nutz.dao.impl.NutDao.update(NutDao.java:267)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule.reload(InvoicePrintModule.java:820)
	at com.liqi.health.cloudhospital.pc.searchprint.module.InvoicePrintModule$FM$reload$6b34e29d0a6ae29b409d3fbb7059cc01.invoke(InvoicePrintModule.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	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:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.liqi.health.cloudhospital.system.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
	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:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.castor.FailToCastObjectException: Fail to cast 'false' to <int>
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:45)
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:19)
	at org.nutz.castor.Castors.cast(Castors.java:252)
	at org.nutz.castor.Castors.castTo(Castors.java:316)
	at org.nutz.dao.jdbc.Jdbcs$Adaptor$4.set(Jdbcs.java:339)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:306)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:90)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
	... 57 more
Caused by: java.lang.NumberFormatException: For input string: "false"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:740)
	at org.nutz.castor.castor.String2Integer.valueOf(String2Integer.java:15)
	at org.nutz.castor.castor.String2Integer.valueOf(String2Integer.java:5)
	at org.nutz.castor.castor.String2Number.cast(String2Number.java:39)
	... 69 more
11 回复

什么版本, 数据库里面的字段类型是什么? pojo贴一下

package com.liqi.health.cloudhospital.pc.searchprint.bean;

import com.liqi.health.cloudhospital.hisinterface.IConstants;
import com.liqi.health.cloudhospital.misc.Utils;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import java.util.Date;

/**
 * Created by kevin on 2017/11/6.
 *
 * @描述: 自助机发票打印机的信息
 */
@Table("t_hospital_invoice_machine")
public class InvoiceMachine {

    public enum MC_STATUS {
        /* 发票打印机状态 */
        NORMAL(0),//正常状态
        ERROR(-1);//异常状态
        private int index;

        MC_STATUS(int index) {
            this.index = index;
        }

        public int getIndex() {
            return index;
        }

        public static MC_STATUS getEnumByType(int index) {
            for (MC_STATUS status : MC_STATUS.values()) {
                if (status.getIndex() == index) {
                    return status;
                }
            }
            return null;
        }
    }

    @Id
    @Column("id")
    private long id;
    @Column("headLetter")
    private String headLetter;
    @Column("beginNum")
    private String beginNum;
    @Column("endNum")
    private String endNum;
    @Column("count")
    private int count;
    @Column("machineId")
    private Integer machineId = -1;
    @Column("machineIp")
    private String machineIp = "";
    @Column("operatorID")
    private String operatorID;
    //自助机的发票打印机状态码
    @Column("mcStatus")
    private int mcStatus;
    //功能是否开启 1:开启 0:停用
    @Column("autoPrint")
    private Integer autoPrint;
    //发票打印机错误描述
    @Column("mcErrorInfo")
    private String mcErrorInfo;
    @Column("createAt")
    private Date createAt;
    @Column("last_update_time")
    private Date lastUpdateTime;
    
    @Column("org_code")
    private String orgCode="";

    private String nextInvoiceNum;

    public String getNextInvoiceNum() {
        try {
            int baginInt = Integer.valueOf(beginNum);//1
            int endInt = Integer.valueOf(endNum);//34546
            int index = baginInt + this.count;//1+1; =2
            if (index > endInt) {//没有下一个发票号了,发票已经打完
                return null;
            }
            //获取发票号码
            this.nextInvoiceNum = headLetter + Utils.stringFormatZero(index + "", 8);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            this.nextInvoiceNum = "发票号段转换错误";
        }
        return this.nextInvoiceNum;
    }

    public boolean isAutoPrint() {
        return autoPrint == 1;
    }

    public InvoiceMachine() {
        createAt = new Date();
        lastUpdateTime = new Date();
        this.orgCode= IConstants.ORG_CODE;
    }

    public int getAutoPrint() {
        return autoPrint;
    }

    public void setAutoPrint(int disabled) {
        this.autoPrint = disabled;
    }

    public int getMcStatus() {
        return mcStatus;
    }

    public void setMcStatus(int mcStatus) {
        this.mcStatus = mcStatus;
    }

    public String getMcErrorInfo() {
        return mcErrorInfo;
    }

    public void setMcErrorInfo(String mcErrorInfo) {
        this.mcErrorInfo = mcErrorInfo;
    }

    public String getHeadLetter() {
        return headLetter;
    }

    public void setHeadLetter(String headLetter) {
        this.headLetter = headLetter;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getBeginNum() {
        return beginNum;
    }

    public void setBeginNum(String beginNum) {
        this.beginNum = beginNum;
    }

    public String getEndNum() {
        return endNum;
    }

    public void setEndNum(String endNum) {
        this.endNum = endNum;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void addCount() {
        this.count++;
    }

    public Integer getMachineId() {
        return machineId;
    }

    public void setMachineId(Integer machineId) {
        this.machineId = machineId;
    }

    public String getMachineIp() {
        return machineIp;
    }

    public void setMachineIp(String machineIp) {
        this.machineIp = machineIp;
    }

    public String getOperatorID() {
        return operatorID;
    }

    public void setOperatorID(String operatorID) {
        this.operatorID = operatorID;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

    @Override
    public String toString() {
        return "InvoiceMachine{" +
                "id=" + id +
                ", headLetter='" + headLetter + '\'' +
                ", beginNum='" + beginNum + '\'' +
                ", endNum='" + endNum + '\'' +
                ", count=" + count +
                ", machineId=" + machineId +
                ", machineIp='" + machineIp + '\'' +
                ", operatorID='" + operatorID + '\'' +
                ", mcStatus=" + mcStatus +
                ", autoPrint=" + autoPrint +
                ", mcErrorInfo='" + mcErrorInfo + '\'' +
                ", createAt=" + createAt +
                ", lastUpdateTime=" + lastUpdateTime +
                ", orgCode='" + orgCode + '\'' +
                ", nextInvoiceNum='" + nextInvoiceNum + '\'' +
                '}';
    }
}

Mysql 数据库, 然后Nutz 版本是 nutz-1.r.62

    public boolean isAutoPrint() {
        return autoPrint == 1;
    }

把它改个名字

@wendal 哦, 原来是这样,谢谢, 我试试先, 但是奇怪的是,不是每次都 会报错, 有时又能正常 更新,但是大部分是报真错的 , 很奇怪 。

 @Column("autoPrint")
    private Integer autoPrint;

改成 Integer 之后, 也可以正常更新记录.......

你之前也是写着Integer autoPrint吧?

我这还没hive2重现, 麻烦debug一下 org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(Connection, DaoStatement) 里面的 conn.createStatement, 看看传递的参数是什么

发错地方了...

@wendal 我刚刚 ,从服务器啦了 class 文件下来看, 一直都是 int autoPrint, 但是服务器上面, 我看日志, 执行 update 是没问题的,可以正常插入.. 好奇怪, 但是我本地运行, 改成 Integer 似乎就没出现过这个问题了。

还是那个isAutoPrint方法,改改才彻底

@wendal 好的, 谢谢 大佬指点

添加回复
请先登陆
回到顶部