JFinal 执行SQL,报ORA-01722: 无效数字 - JFinal报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

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

montos 2020-05-31 13:00:22 31

@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

SQL
分享到
取消 提交回答
全部回答(1)
  • montos
    2020-05-31 13:06:04

    隐式类型转换有误,查看是否使用的数据类型和定义的相符

    0 0
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题