ORA-01461错误解决
ORA-01461: can bind a LONG value only for insert into a LONG column
原来是用weblogic的连接池,没有问题。
转为tomcat或直接jdbc调用,报错。
原因:使用了ojdbc14.jar,更新为ojdbc6即可。weblogic连接池是不用WEB-INF下的lib的ojdbc.jar的。
详细错误信息:
DEBUG SQL execute time: 0.0s
DEBUG SQL update TF_SP_USER_PERSON set ADDRESS = ?,CERTIFICATE_NO = ?,CERTIFICATE_TYPE = ?,CREATE_TIME = ?,CUST_LEVEL = ?,CUST_NO = ?,CUST_RISK = ?,HEAD_FILE_ID = ?,IS_FUND_FLAG = ?,MOBILE_PHONE = ?,PERSON_NAME = ?,POST_CODE = ?,RISK_END_DATE = ?,SP_USER_ID = ?,SP_USER_NAME = ?,UPDATE_TIME = ? where SP_USER_ID = ?
DEBUG PARAM [佛山, 441422199108292310, 0, 2015-01-23 17:14:45.0, null, 31507, , null, 1, 1868880XXXX, 桂强, 528000, , 1000139, 桂强, 2015-01-28 16:07:08.0, 1000139]
ERROR ERROR SQL update TF_SP_USER_PERSON set ADDRESS = ?,CERTIFICATE_NO = ?,CERTIFICATE_TYPE = ?,CREATE_TIME = ?,CUST_LEVEL = ?,CUST_NO = ?,CUST_RISK = ?,HEAD_FILE_ID = ?,IS_FUND_FLAG = ?,MOBILE_PHONE = ?,PERSON_NAME = ?,POST_CODE = ?,RISK_END_DATE = ?,SP_USER_ID = ?,SP_USER_NAME = ?,UPDATE_TIME = ? where SP_USER_ID = ?
org.apache.tapestry.ApplicationRuntimeException: Unable to invoke method personLogin on com.company.thfund.view.Login$Enhance_1@627bc7[thfund.Login]: null
at org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(ListenerMap.java:283)
at org.apache.tapestry.listener.ListenerMap.access$100(ListenerMap.java:46)
at org.apache.tapestry.listener.ListenerMap$SyntheticListener.invoke(ListenerMap.java:97)
at org.apache.tapestry.listener.ListenerMap$SyntheticListener.actionTriggered(ListenerMap.java:102)
at com.company.webframework.tapestry.components.ajaxComponent.MappService.service(MappService.java:78)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:889)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.company.filter.RightFilter.doFilter(RightFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.company.filter.AutoLoginFilter.doFilter(AutoLoginFilter.java:56)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.company.filter.security.xss.XSSSecurityFilter.doFilter(XSSSecurityFilter.java:36)
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:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
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 org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(ListenerMap.java:257)
... 30 more
Caused by: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at com.company.dbframework.jdbc.ParameterStatement.executeUpdate(ParameterStatement.java:99)
at com.company.dbframework.jdbc.DaoManager.executeUpdate(DaoManager.java:244)
at com.company.dbframework.jdbc.DaoManager.update(DaoManager.java:989)
at com.company.dbframework.jdbc.DaoManager.save(DaoManager.java:1319)
at com.company.dbframework.jdbc.DaoManager.save(DaoManager.java:1274)
at com.company.dbframework.jdbc.DaoManager.save(DaoManager.java:1235)
at com.company.dbframework.jdbc.DaoManager.save(DaoManager.java:1246)
at com.company.thfund.bean.register.RegisterDAO.updatePerson(RegisterDAO.java:50)
at com.company.thfund.bean.login.LoginBean.modifyPersonInfo(LoginBean.java:243)
at com.company.thfund.view.Login.personLogin(Login.java:99)
... 35 more
ERROR execute failed, rollback...sdcen1