问题描述
在数据库中手动添加一个主键字段(此时数据库中没有任何数据),实体类也进行了响应的更改,在执行“保存”操作时报错“无效数字”,但是我查看过数据类型以及保存的数据,“数据类型---数据”对应上没有问题,求大神帮忙咋办!!!在线等....Hibernate:selectsstockretu_.STATION_ID,sstockretu_.ID,sstockretu_.MERCHANT_ID,sstockretu_.APPROVER_DATETIMEasAPPROVER4_76_,sstockretu_.APPROVER_IDasAPPROVER5_76_,sstockretu_.APPROVER_NAMEasAPPROVER6_76_,sstockretu_.AUDIT_DATETIMEasAUDIT7_76_,sstockretu_.AUDIT_STATUSasAUDIT8_76_,sstockretu_.AUDITOR_IDasAUDITOR9_76_,sstockretu_.LATE_DATEasLATE10_76_,sstockretu_.NOTEasNOTE76_,sstockretu_.OPERATOR_IDasOPERATOR12_76_,sstockretu_.REC_DATETIMEasREC13_76_,sstockretu_.SHIFT_DATEasSHIFT14_76_,sstockretu_.SHIFT_NOasSHIFT15_76_,sstockretu_.STATUSasSTATUS76_,sstockretu_.STOCK_IDasSTOCK17_76_fromS_STOCK_RETURNS_REQsstockretu_wheresstockretu_.STATION_ID=?andsstockretu_.ID=?andsstockretu_.MERCHANT_ID=?Hibernate:insertintoS_STOCK_RETURNS_REQ(APPROVER_DATETIME,APPROVER_ID,APPROVER_NAME,AUDIT_DATETIME,AUDIT_STATUS,AUDITOR_ID,LATE_DATE,NOTE,OPERATOR_ID,REC_DATETIME,SHIFT_DATE,SHIFT_NO,STATUS,STOCK_ID,STATION_ID,ID,MERCHANT_ID)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)[ERROR][2014-09-2916:16:51,385][org.hibernate.util.JDBCExceptionReporter]ORA-01722:无效数字[ERROR][2014-09-2916:16:51,385][org.hibernate.util.JDBCExceptionReporter]ORA-01722:无效数字[ERROR][2014-09-2916:16:51,385][org.hibernate.event.def.AbstractFlushingEventListener]Couldnotsynchronizedatabasestatewithsessionorg.hibernate.exception.SQLGrammarException:CouldnotexecuteJDBCbatchupdateatorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)atorg.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)atorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)atorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)atorg.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390)atorg.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407)atorg.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)atorg.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737)atcom.cssi.card.base.dao.impl.BaseDaoImpl.save(BaseDaoImpl.java:32)atcom.cssi.card.returns.dao.impl.ReturnDaoImpl.saveReturnApply(ReturnDaoImpl.java:162)atcom.cssi.card.returns.service.impl.ReturnServiceImpl.saveReturnApply(ReturnServiceImpl.java:106)atcom.cssi.card.retruns.action.ReturnAction.saveReturnApply(ReturnAction.java:241)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)atorg.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)atCausedby:java.sql.BatchUpdateException:ORA-01722:无效数字atoracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)atoracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)atorg.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)at$java.sql.PreparedStatement$$EnhancerByProxool$$5c72dc18.executeBatch(<generated>)atorg.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)atorg.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)...90more
解决方案
解决方案二:
SQL拷出来,在数据库中执行试下
解决方案三:
你看下保存数据字段的值是不是有空格?
解决方案四:
保存数据字段的值?
解决方案五:
oracle多少的jar问题?,是不是数据长度问题?。。。
解决方案六:
不是,肯定跟jar没关系....