JFinal 执行SQL,报ORA-01722: 无效数字

sgt186 发布于 2015/12/28 17:55
阅读 413
收藏 0

@JFinal 你好,想跟你请教个问题:这个是个发送短信的oracle,当执行sql时异常

JFinal action report -------- 2015-12-28 17:48:03 ------------------------------
Controller  : com.ynunicom.controller.MessageController.(MessageController.java:1)
Method      : saveMessage
Parameter   : smsAccessNo=10****25  content=您好,测试短信验证码。短信验证码:800549  moblie=181******84  
--------------------------------------------------------------------------------
Sql: insert into tb_smp_sms(CREATE_DESPART, STATE, CREATE_TIME, END_HOUR1, USER_CODE, END_HOUR2, CREATE_STAFF, END_DATE, DLIEVER_STATE, SEND_TYPE, SENT_BG_TIME, END_HOUR, CHANNEL_TYPE, SMS_ID, BATCH, BUSINESS_ID, BEGIN_HOUR1, PLAN_ID, PRIORITY, FLOW_CODE, BEGIN_DATE, PUT_TIME, BEGIN_HOUR2, BEGIN_HOUR, SEND_CONTENT, FROM_TEL, TO_TEL, SENT_END_TIME, LATN_ID, SYS_CODE, NEED_RESPORT, PARAMS) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
验证码短信保存失败
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: ORA-01722: 无效数字


at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:534)
at com.jfinal.plugin.activerecord.Db.save(Db.java:371)
at com.ynunicom.controller.MessageController.saveMessage(MessageController.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: ORA-01722: 无效数字


at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:965)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3338)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3422)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:515)
at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:532)
... 21 more

以下是问题补充:

@sgt186:经查看,是主键的问题,主键是一个number型,但是插入数据是XXX.Nextval,是自增的序列。jfinal可以处理么? (2015/12/28 18:53)
@sgt186:经查看,是主键的问题,主键是一个number型,但是插入数据是XXX.Nextval,是自增的序列。jfinal可以处理么? (2015/12/28 18:53)
@sgt186:已处理好,如果插入的是序列,请转为小写,再保存。 (2015/12/28 19:16)
加载中
0
罐头1124

你好,我的也是报这个错误。 nextval也是小写。 还是报无效数字

返回顶部
顶部