java.sql.SQLSyntaxErrorException: ORA-01722: 无效数字

### error updating database.  cause: java.sql.sqlsyntaxerrorexception: ora-01722: 无效数字

### the error may involve com.lecar.user.mapper.stationmanagemapper.insertstation-inline
### the error occurred while setting parameters
### sql: insert into t_corp_station_info           (c_corp_id,n_station_code,v_station_name,v_station_header,v_station_tel,v_sendsite,n_area_id,v_station_note,n_inputflag,n_mainflag,n_sendflag,n_arrivedflag,           n_endflag,n_sendoutflag,n_sendinflag,n_arrivedoutflag,n_arrivedinflag,n_delflag,v_input_user_name,d_input_date)           values (?,?,?,?,?,?,           ?,?,?,?,           ?,?,?,?,           ?,?,           ?,?,?,?)
### cause: java.sql.sqlsyntaxerrorexception: ora-01722: 无效数字

; sql []; ora-01722: 无效数字
; nested exception is java.sql.sqlsyntaxerrorexception: ora-01722: 无效数字


    at org.springframework.jdbc.support.sqlerrorcodesqlexceptiontranslator.dotranslate(sqlerrorcodesqlexceptiontranslator.java:242)
    at org.springframework.jdbc.support.abstractfallbacksqlexceptiontranslator.translate(abstractfallbacksqlexceptiontranslator.java:73)
    at org.mybatis.spring.mybatisexceptiontranslator.translateexceptionifpossible(mybatisexceptiontranslator.java:75)
    at org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke(sqlsessiontemplate.java:447)
    at com.sun.proxy.$proxy120.insert(unknown source)
    at org.mybatis.spring.sqlsessiontemplate.insert(sqlsessiontemplate.java:279)
    at org.apache.ibatis.binding.mappermethod.execute(mappermethod.java:56)
    at org.apache.ibatis.binding.mapperproxy.invoke(mapperproxy.java:53)
    at com.sun.proxy.$proxy189.insertstation(unknown source)
    at com.lecar.user.company.teststationmapper.insertstation(teststationmapper.java:69)
    at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
    at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
    at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
    at java.lang.reflect.method.invoke(method.java:498)
    at org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:50)
    at org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12)
    at org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:47)
    at org.junit.internal.runners.statements.invokemethod.evaluate(invokemethod.java:17)
    at org.springframework.test.context.junit4.statements.runbeforetestmethodcallbacks.evaluate(runbeforetestmethodcallbacks.java:75)
    at org.springframework.test.context.junit4.statements.runaftertestmethodcallbacks.evaluate(runaftertestmethodcallbacks.java:86)
    at org.springframework.test.context.junit4.statements.springrepeat.evaluate(springrepeat.java:84)
    at org.junit.runners.parentrunner.runleaf(parentrunner.java:325)
    at org.springframework.test.context.junit4.springjunit4classrunner.runchild(springjunit4classrunner.java:252)
    at org.springframework.test.context.junit4.springjunit4classrunner.runchild(springjunit4classrunner.java:94)
    at org.junit.runners.parentrunner$3.run(parentrunner.java:290)
    at org.junit.runners.parentrunner$1.schedule(parentrunner.java:71)
    at org.junit.runners.parentrunner.runchildren(parentrunner.java:288)
    at org.junit.runners.parentrunner.access$000(parentrunner.java:58)
    at org.junit.runners.parentrunner$2.evaluate(parentrunner.java:268)
    at org.springframework.test.context.junit4.statements.runbeforetestclasscallbacks.evaluate(runbeforetestclasscallbacks.java:61)
    at org.springframework.test.context.junit4.statements.runaftertestclasscallbacks.evaluate(runaftertestclasscallbacks.java:70)
    at org.junit.runners.parentrunner.run(parentrunner.java:363)
    at org.springframework.test.context.junit4.springjunit4classrunner.run(springjunit4classrunner.java:191)
    at org.junit.runner.junitcore.run(junitcore.java:137)
    at com.intellij.junit4.junit4ideatestrunner.startrunnerwithargs(junit4ideatestrunner.java:68)
    at com.intellij.rt.execution.junit.ideatestrunner$repeater.startrunnerwithargs(ideatestrunner.java:47)
    at com.intellij.rt.execution.junit.junitstarter.preparestreamsandstart(junitstarter.java:242)
    at com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:70)
caused by: java.sql.sqlsyntaxerrorexception: ora-01722: 无效数字

    at oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:450)
    at oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:399)
    at oracle.jdbc.driver.t4c8oall.processerror(t4c8oall.java:837)
    at oracle.jdbc.driver.t4cttifun.receive(t4cttifun.java:459)
    at oracle.jdbc.driver.t4cttifun.dorpc(t4cttifun.java:193)
    at oracle.jdbc.driver.t4c8oall.dooall(t4c8oall.java:531)
    at oracle.jdbc.driver.t4cpreparedstatement.dooall8(t4cpreparedstatement.java:225)
    at oracle.jdbc.driver.t4cpreparedstatement.executeforrows(t4cpreparedstatement.java:1264)
    at oracle.jdbc.driver.oraclestatement.doexecutewithtimeout(oraclestatement.java:1585)
    at oracle.jdbc.driver.oraclepreparedstatement.executeinternal(oraclepreparedstatement.java:3929)
    at oracle.jdbc.driver.oraclepreparedstatement.execute(oraclepreparedstatement.java:4118)
    at oracle.jdbc.driver.oraclepreparedstatementwrapper.execute(oraclepreparedstatementwrapper.java:4093)
    at com.zaxxer.hikari.pool.proxypreparedstatement.execute(proxypreparedstatement.java:44)
    at com.zaxxer.hikari.pool.hikariproxypreparedstatement.execute(hikariproxypreparedstatement.java)
    at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
    at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
    at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
    at java.lang.reflect.method.invoke(method.java:498)
    at org.apache.ibatis.logging.jdbc.preparedstatementlogger.invoke(preparedstatementlogger.java:59)
    at com.sun.proxy.$proxy191.execute(unknown source)
    at org.apache.ibatis.executor.statement.preparedstatementhandler.update(preparedstatementhandler.java:46)
    at org.apache.ibatis.executor.statement.routingstatementhandler.update(routingstatementhandler.java:74)
    at org.apache.ibatis.executor.simpleexecutor.doupdate(simpleexecutor.java:50)
    at org.apache.ibatis.executor.baseexecutor.update(baseexecutor.java:117)
    at org.apache.ibatis.executor.cachingexecutor.update(cachingexecutor.java:76)
    at org.apache.ibatis.session.defaults.defaultsqlsession.update(defaultsqlsession.java:198)
    at org.apache.ibatis.session.defaults.defaultsqlsession.insert(defaultsqlsession.java:185)
    at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
    at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
    at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
    at java.lang.reflect.method.invoke(method.java:498)
    at org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke(sqlsessiontemplate.java:434)
    ... 34 more

解决办法 :实体类的格式与数据库格式不匹配!

仔细检查会成功的!

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐