SQLException: 'Infinity' is not a valid numeric or

项目异常,报错如下,原因是因为某一个字段设置值是a/b ,b为0的原因(数据库设置为double)。

com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: 'Infinity' is not a valid numeric or approximate numeric value

at com.jfinal.plugin.activerecord.Model.save(Model.java:375)

at com.lxinet.qqorder.controller.OrdersController.save(OrdersController.java:433)

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:606)

at com.jfinal.aop.Invocation.invoke(Invocation.java:71)

at com.lxinet.qqorder.interceptor.UserLoginInterceptor.intercept(UserLoginInterceptor.java:16)

at com.jfinal.aop.Invocation.invoke(Invocation.java:65)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)

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.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:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.sql.SQLException: 'Infinity' is not a valid numeric or approximate numeric value

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)

at com.mysql.jdbc.PreparedStatement.setDouble(PreparedStatement.java:3680)

at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:3994)

at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:365)

at com.jfinal.plugin.activerecord.dialect.Dialect.fillStatement(Dialect.java:68)

at com.jfinal.plugin.activerecord.Model.save(Model.java:369)

... 26 more


你可能感兴趣的:(SQLException: 'Infinity' is not a valid numeric or)