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

开发者社区> 问答> 正文

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

kun坤 2020-06-08 11:04:58 70

@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)
  • kun坤
    2020-06-09 23:35:43

    "配置的时候指定配置的文件名,区别开来试试######

    把每个logger的名称定义为在全部项目中都不重复的...

    不过我是从来没碰到过你这种问题.

    ######仅供参考.######速度发上来,我们老大想知道这个是怎么做到的。######

    没明白问题,能说详细点吗?你这多个项目是maven dependency的关系?还是独立的?如果是独立的,每个项目只是用自己classpath下面的log4j.properties。如果是maven dependency的关系,class loader也只会load最先的一个,后面的都会忽略。

    如果你是有多个properties,例如log4j.admin.perperties和log4j.public.properties的话,你可以用:

    #log4j.admin.properties
    log4j.appender.admin=org.apache.log4j.ConsoleAppender
    #log4j.public.properties
    log4j.appender.public=org.apache.log4j.ConsoleAppender 

    然后再在 class 里面:

    PropertyConfigurator.configure(Client.class .getResource("/log4j.admin.properties"));
    Logger adminLogger = Logger.getLogger("admin");
    adminLogger.info("admin log");
    public 类似。

    ######

    多谢各位的热心,解决方法在http://blog.csdn.net/caoxiaofan/article/details/6971743

     

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

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

推荐文章
相似问题