日期:2014-05-20  浏览次数:20873 次

hibernate奇怪的异常
插入100条 每次都是奇数条成功 偶数条抛这个异常 每次只能插入50条 求高手帮忙
Hibernate: insert into H_SAM_SAMPLE (SAMPLE_TYPE_ID, AREA_ID, SAMPLE_NUM, OLD_SAMPLE_NUM, ORDER_ID, SHOW_NAME, IS_MANY, MANY_ID, IS_GET, CHECK_SITE, INT_NO, INT_TOTAL, INT_DATE, STORE_RACK, STORE_BOX, PER_CODE, DIRECTION, IS_CHECKED, CUSTOMER_CODE, MEMO, SOURCE, PROJECT_ID, PERSON_NAME, PERSON_SEX, PERSON_NATION, PERSON_AGE, PERSON_POST, IS_HANG_SAMPLE, PERSON_ADDRESS, PERSON_TEL, CUSTOM_ID, ACCEPT_SAMPLE_TIME, SAMPLE_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into NEWHEALTH_TEST_2.H_SAMPLE_BOARD_INFO (POSITION_POINT, SAMPLE_NUM, BOARD_NAME, CREAT_DATE, flag, ID) values (?, ?, ?, ?, ?, ?)
2012-6-4 15:29:18 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1031, SQLState: 42000
2012-6-4 15:29:18 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: ORA-01031: insufficient privileges

2012-6-4 15:29:18 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1031, SQLState: 42000
2012-6-4 15:29:18 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: ORA-01031: insufficient privileges

2012-6-4 15:29:18 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
严重: Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.achievo.query.HibernateListTemplate$ListHibernateCallback.doInHibernate(HibernateListTemplate.java:155)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:387)
at org.achievo.query.HibernateListTemplate.find(HibernateListTemplate.java:83)
at org.achievo.dao.BaseDaoByHB.query(BaseDaoByHB.java:168)
at org.achievo.platform.bean.BaseBean.query(BaseBean.java:137)
at cn.org.genomics.health.solexa.prenatal.bloodTask.dao.impl.hb.SamSampleDao.findSampleByCode(SamSampleDao.java:55)
at cn.org.genomics.health.project.service.impl.SynchronizationSampleService.saveSynchronizationSample(SynchronizationSampleService.java:271)
at cn.org.genomics.health.project.service.impl.SynchronizationSampleService.saveSynchronizationSample(SynchronizationSampleService.java:226)
at cn.org.genomics.health.project.service.impl.SynchronizationSampleService$$FastClassByCGLIB$$e713d9cf.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)