`
锁上门睡觉
  • 浏览: 8440 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

hibernate 異常

阅读更多
Hibernate 拋出異常為:
對數據庫插入記錄時 拋出異常(hibernate 3.0):
Hibernate: insert into LATENT_COMPANY (F_ID, F_NAMEC, F_SNAME, F_TNO, EXPLAIN, F_EXPLAIN, F_REPLC, CONTACT, TITLE, F_TEL, MOBILE, F_FAX, E_MAIL, F_ADDRC, F_POST, F_ADDR, F_URL, ITEM_SCRPTC, CREATE_DATE, IS_DISABLE, CREATOR, BASE_ID, F_REPPROD, PARK_ID, LEVEL_ID, F_KIND, NO_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
16:54:50,218  WARN JDBCExceptionReporter:71 - SQL Error: 1401, SQLState: 23000
16:54:50,218 ERROR JDBCExceptionReporter:72 - ORA-01401: 插入的值对于列过大

16:54:50,218  WARN JDBCExceptionReporter:71 - SQL Error: 1401, SQLState: 23000
16:54:50,218 ERROR JDBCExceptionReporter:72 - ORA-01401: 插入的值对于列过大

16:54:50,234 ERROR AbstractFlushingEventListener:300 - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at com.cavell.frameworkx.transaction.TransactionManager.commitTransaction(TransactionManager.java:38)
    at com.cavell.frameworkx.action.BaseAction.execute(BaseAction.java:65)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
    at com.cavell.frameworkx.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:75)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.BatchUpdateException: ORA-01401: 插入的值对于列过大

    at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
    ... 48 more
16:54:50,234  WARN RequestProcessor:538 - Unhandled Exception thrown: class org.hibernate.exception.ConstraintViolationException

LatentCompanyhbm.xml:
<hibernate-mapping package="com.axtronics.pcm.bean"><class>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="com.axtronics.pcm.bean">
<hibernate-mapping package="com.axtronics.pcm.bean">
    <class
        name="LatentCompany"
        table="LATENT_COMPANY"
    >
        <meta attribute="sync-DAO">false</meta>
        <id
            name="Id"
            type="integer"
            column="NO_ID"
        >
            <generator class="sequence">
            <param name="sequence">OBJECT_UNIQUE_ID</param>
            </generator>
       </id><class><id><generator class="sequence"></generator>
       </id><id><generator class="sequence"></generator>
  </id>
        < <property>
            name="FId"
            column="F_ID"
            type="string"
            not-null="true"
            length="10"
        />
        <property>
            name="FNamec"
            column="F_NAMEC"
            type="string"
            not-null="true"
            length="50"
        />
        <property>
            name="FSname"
            column="F_SNAME"
            type="string"
            not-null="true"
            length="20"
        />
        <property>
            name="FTno"
            column="F_TNO"
            type="string"
            not-null="true"
            length="8"
        />
        <property>
            name="Explain"
            column="EXPLAIN"
            type="string"
            not-null="false"
            length="50"
        />
        <property>
            name="FExplain"
            column="F_EXPLAIN"
            type="string"
            not-null="false"
            length="50"
        />
        <property>
            name="FReplc"
            column="F_REPLC"
            type="string"
            not-null="true"
            length="20"
        />
        <property>
            name="Contact"
            column="CONTACT"
            type="string"
            not-null="true"
            length="20"
        />
        <property>
            name="Title"
            column="TITLE"
            type="string"
            not-null="true"
            length="20"
        />
        <property>
            name="FTel"
            column="F_TEL"
            type="string"
            not-null="true"
            length="20"
        />
        <property>
            name="Mobile"
            column="MOBILE"
            type="string"
            not-null="false"
            length="20"
        />
        <property>
            name="FFax"
            column="F_FAX"
            type="string"
            not-null="false"
            length="20"
        />
        <property>
            name="EMail"
            column="E_MAIL"
            type="string"
            not-null="false"
            length="50"
        />
        <property>
            name="FAddrc"
            column="F_ADDRC"
            type="string"
            not-null="true"
            length="100"
        />
        <property>
            name="FPost"
            column="F_POST"
            type="string"
            not-null="true"
            length="10"
        />
        <property>
            name="FAddr"
            column="F_ADDR"
            type="string"
            not-null="false"
            length="100"
        />
        <property>
            name="FUrl"
            column="F_URL"
            type="string"
            not-null="false"
            length="100"
        />
        <property>
            name="ItemScrptc"
            column="ITEM_SCRPTC"
            type="string"
            not-null="true"
            length="512"
        />
        <property>
            name="CreateDate"
            column="CREATE_DATE"
            type="timestamp"
            not-null="true"
            length="23"
        />
        <property>
            name="Disable"
            column="IS_DISABLE"
            type="true_false"
            not-null="false"
            length="1"
        />
        <property>
            name="Creator"
            column="CREATOR"
            type="string"
            not-null="true"
            length="50"
        />
        <many-to-one>
            name="Base"
            column="BASE_ID"
            class="Base"
            not-null="true"
        >
        </many-to-one>
        <many-to-one>
            name="FRepprod"
            column="F_REPPROD"
            class="IndustrySub"
            not-null="true"
        >
        </many-to-one>
        <many-to-one>
            name="Park"
            column="PARK_ID"
            class="Park"
            not-null="true"
        >
        </many-to-one>
        <many-to-one>
            name="Level"
            column="LEVEL_ID"
            class="CompanyLevel"
            not-null="true"
        >
        </many-to-one>
        <many-to-one>
            name="FKind"
            column="F_KIND"
            class="Industry"
            not-null="true"
        >
       </many-to-one><key column="F_ID">
java 代碼:

public ActionForward save(final ActionMapping mapping, final ActionForm form,
            final HttpServletRequest request, final HttpServletResponse response) {
        LatentCompanySrv latentCompanySrv = new LatentCompanySrv();
        LatentCompanyForm aform = (LatentCompanyForm)form;
        LatentCompany latentCompany = null;
       
        int id = 0;
        if (request.getParameter("id") != null) {
            id = Integer.parseInt(request.getParameter("id"));
        }
       
        if (id > 0) {
            latentCompany = (LatentCompany)latentCompanySrv.find(LatentCompany.class, new Integer(id));
        } else {
            latentCompany =  new LatentCompany();

        }
       
        latentCompany = (LatentCompany)LatentCompanyHelp.convert2Bean(aform);
        String userId = request.getParameter("userId");
       
        //waiting for request document.
        if (userId != null && !"".equals(userId.trim())) {
            latentCompany.setCreator(userId);
        } else latentCompany.setCreator("admin");
       
        latentCompanySrv.saveOrUpdate(latentCompany);
        return mapping.findForward("add");
    }

public static Object convert2Bean(LatentCompanyForm aform) {
        LatentCompany latentCompany = new LatentCompany();
        LatentCompanySrv latentCompanySrv = new LatentCompanySrv();
        latentCompany.setCreateDate(new java.util.Date());
       
        //auto create....the FId and FTno,should to modify....
        latentCompany.setFTno(aform.getFtno());
        latentCompany.setFId(aform.getFid());
       
        latentCompany.setFNamec(aform.getFnamec());
        latentCompany.setFSname(aform.getFsname());
        latentCompany.setFReplc(aform.getFreplc());
        latentCompany.setContact(aform.getContact());
        latentCompany.setTitle(aform.getTitle());
        latentCompany.setFTel(aform.getFtel());
        latentCompany.setMobile(aform.getMobile());
        latentCompany.setFFax(aform.getFfax());
        latentCompany.setEMail(aform.getEmail());
        latentCompany.setFAddrc(aform.getFaddrc());
        latentCompany.setFAddr(aform.getFaddr());
        latentCompany.setFPost(aform.getFpost());
        latentCompany.setFUrl(aform.getFurl());
        latentCompany.setItemScrptc(aform.getItemScrptc());
       
        String baseId = aform.getBaseId();
        String parkId = aform.getParkId();
        String indId = aform.getIndId();
        String subId = aform.getSubId();
        String levelId = aform.getLevelId();
       

        latentCompany.setBase((Base)latentCompanySrv.getBase(baseId));
        latentCompany.setPark((Park)latentCompanySrv.getPark(parkId));
        latentCompany.setFKind((</key> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </class>Industry<hibernate-mapping package="com.axtronics.pcm.bean"><class> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property><key column="F_ID">)latentCompanySrv.getIndustry(indId));
        latentCompany.setFRepprod((I</key></property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </class></hibernate-mapping>ndustrySub<hibernate-mapping package="com.axtronics.pcm.bean"><class> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property> <property><key column="F_ID">)latentCompanySrv.getIndustrySub(subId));
        latentCompany.setLevel((CompanyLevel)latentCompanySrv.getCompanyLevel(levelId));

        return latentCompany;
    }</key></property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </property> </class></hibernate-mapping></hibernate-mapping></class></hibernate-mapping>
分享到:
评论
3 楼 glamey 2008-01-28  
应该就是长度大于了数据库定义的最大长度。
还是要细心点。
2 楼 alajl 2007-09-15  
16:54:50,218 ERROR JDBCExceptionReporter:72 - ORA-01401: 插入的值对于列过大

建议:

是不是你的某个属性的长度大于了在数据库中定义的长度啊?

仔细检查一下

1 楼 jiang9885 2007-09-12  
大哥,解决没有呀?我和你的问题一样,急呀.hibernate+oracle?

2007-09-11 14:12:52 [org.hibernate.util.JDBCExceptionReporter]-[DEBUG] Could not execute JDBC batch update [insert into PLCES.TB_LOAN (CUSTOMERID, LOANBRANCH, BUYHOUSEAMOUNT, BUYHOUSEAREA, BUYHOUSEADDRESS, LOFTAREA, GARAGEAREA, BIKEAREA, MORTGAGER, ASSURER, DEPOSITPERCENT, DEPOSITAMOUNT, HOUSE1MORT, HOUSE1AMOUNT, HOUSE1AREA, HOUSE1ADDRESS, HOUSE2MORT, HOUSE2AMOUNT, HOUSE2AREA, HOUSE2ADDRESS, HOUSEARRSURER, CARNO, CARKIND, CARFACTORYKIND, CARFRAMENO, CARENGENERNO, CARAMOUNT, CARREGISTERNO, CARARRSURER, PAWN1NAME, PAWN1OWNER, PAWN1NO, PAWN1AMOUNT, PAWN2NAME, PAWN2OWNER, PAWN2NO, PAWN2AMOUNT, PAWN3NAME, PAWN3OWNER, PAWN3NO, PAWN3AMOUNT, PAWN4NAME, PAWN4OWNER, PAWN4NO, PAWN4AMOUNT, PAWN5NAME, PAWN5OWNER, PAWN5NO, PAWN5AMOUNT, NOTE1, NOTE2, NOTE3, NOTE4, NOTE5, LOANACCOUNT) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
java.sql.BatchUpdateException: ORA-01401: 插入的值对于列过大

at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:458)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java(Compiled Code))
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Inlined Compiled Code))
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java(Compiled Code))
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java(Inlined Compiled Code))
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java(Compiled Code))
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java(Compiled Code))
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java(Compiled Code))
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java(Compiled Code))
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java(Compiled Code))
at com.zjft.plces.service.LoaninfoService$$EnhancerByCGLIB$$ab63303d.addTest(<generated>)
at com.zjft.plces.web.LoaninfoController.loaninfo_add_loansubmit_detail(LoaninfoController.java:415)
at sun.reflect.GeneratedMethodAccessor495.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java(Compiled Code))
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java(Compiled Code))
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
2007-09-11 14:12:52 [org.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: 1401, SQLState: 23000
2007-09-11 14:12:52 [org.hibernate.util.JDBCExceptionReporter]-[ERROR] ORA-01401: 插入的值对于列过大

2007-09-11 14:12:52 [org.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: 1401, SQLState: 23000
2007-09-11 14:12:52 [org.hibernate.util.JDBCExceptionReporter]-[ERROR] ORA-01401: 插入的值对于列过大

2007-09-11 14:12:52 [org.hibernate.event.def.AbstractFlushingEventListener]-[ERROR] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Inlined Compiled Code))
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java(Compiled Code))
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java(Inlined Compiled Code))
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java(Compiled Code))
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java(Compiled Code))
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java(Compiled Code))
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java(Compiled Code))
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java(Compiled Code))
at com.zjft.plces.service.LoaninfoService$$EnhancerByCGLIB$$ab63303d.addTest(<generated>)
at com.zjft.plces.web.LoaninfoController.loaninfo_add_loansubmit_detail(LoaninfoController.java:415)
at sun.reflect.GeneratedMethodAccessor495.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java(Compiled Code))
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java(Compiled Code))
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.sql.BatchUpdateException: ORA-01401: 插入的值对于列过大

at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:458)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java(Compiled Code))
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java(Compiled Code))
... 61 more
2007-09-11 14:12:52 [org.springframework.orm.hibernate3.HibernateTransactionManager]-[DEBUG] Initiating transaction rollback after commit exception
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
Caused by:
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java(Compiled Code))
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Inlined Compiled Code))
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java(Compiled Code))
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java(Inlined Compiled Code))
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java(Compiled Code))
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java(Compiled Code))
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java(Compiled Code))
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java(Compiled Code))
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java(Compiled Code))
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java(Compiled Code))
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java(Compiled Code))
at com.zjft.plces.service.LoaninfoService$$EnhancerByCGLIB$$ab63303d.addTest(<generated>)
at com.zjft.plces.web.LoaninfoController.loaninfo_add_loansubmit_detail(LoaninfoController.java:415)
at sun.reflect.GeneratedMethodAccessor495.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java(Compiled Code))
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java(Compiled Code))
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java(Compiled Code))
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java(Compiled Code))
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.sql.BatchUpdateException: ORA-01401: 插入的值对于列过大

at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:458)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java(Compiled Code))
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java(Compiled Code))
... 61 more

相关推荐

    hibernate异常文档.xls

    hibernate异常文档.xls hibernate异常文档.xls

    hibernate 常见异常

    本文将深入探讨Hibernate常见的异常,以及与之相关的依赖库。 首先,我们看到的`java.lang.NoClassDefFoundError`是一个典型的运行时异常,表示在类加载时找不到对应的类定义。这通常意味着在编译时存在所需的类,...

    Java_Jdbc_Hibernate_Struts2_Android_Web异常及其处理办法

    【Hibernate异常处理】 Hibernate是一个流行的ORM(对象关系映射)框架,允许开发者使用面向对象的方式来操作数据库。在使用Hibernate时,可能会遇到`HibernateException`,这通常表示与数据持久化有关的问题。处理...

    hibernate常見錯誤

    ### Hibernate常见错误解析 #### 一、`java.lang.NoClassDefFoundError`:net/sf/ehcache/CacheException 在启动Hibernate时遇到此类错误通常是因为类路径(Classpath)中缺失必要的jar包。具体到这个例子中,问题...

    Hibernate_参考中文版

    - **HibernateException**:所有Hibernate异常的基类。 - **SQLGrammarException**:执行SQL语句时发生的异常。 - **ConstraintViolationException**:违反数据库约束时抛出的异常。 #### 十、性能优化 - **查询...

    hibernate常见错误解决方案

    本文将针对几个常见的Hibernate异常进行详细解析,并提供相应的解决策略。 #### 1. **DOM4J DocumentException: Invalid byte 2 of 2-byte UTF-8 sequence** **异常描述:** 当Hibernate尝试解析一个XML配置文件时...

    Hibernate数据持久层框架 v6.4.4.zip

    7. 异常体系:Hibernate有一套完整的异常体系,如`HibernateException`是所有Hibernate异常的基类,帮助开发者快速定位和解决问题。 总的来说,Hibernate v6.4.4不仅提供了完善的ORM功能,还在性能优化、查询能力、...

    hibernate常见异常

    Hibernate 常见异常处理 Hibernate 是一个流行的 Java 持久层框架,但是在实际开发中,我们经常会遇到各种异常。了解这些异常的原因和解决方案是非常重要的。本文将介绍 Hibernate 中的一些常见异常,包括 ...

    hibernate学习ppt版本

    PPT可能会列出常见的Hibernate异常,以及如何优雅地处理这些异常。 **9. 关联映射** 在Hibernate中,可以处理一对一、一对多、多对一和多对多的关系映射。这部分内容可能涉及如何配置关联映射,以及在实际操作中的...

    hibernate3.3.2 案例包

    通过这些例子,你可以了解到如何处理常见的Hibernate异常,以及如何配置日志系统来获取必要的运行信息。 总的来说,这个"hibernate3.3.2案例包"是一个全面的学习资源,无论你是初学者还是经验丰富的开发者,都能...

    hibernate开发手册2hibernate开发手册2

    - **日志和异常处理**:集成Log4j进行日志记录,处理可能出现的Hibernate异常。 通过《hibernate开发手册2》,读者将能深入理解Hibernate的原理和实践,提升数据库操作的效率,更好地适应企业级Java开发需求。书中...

    Hibernate中文帮助文档.rar

    错误和异常处理是开发过程中不可避免的部分,文档会列出常见的Hibernate异常,以及它们可能的原因和解决策略。最后,可能会涉及到一些高级话题,如Hibernate的性能优化、实体生命周期管理、批量操作、级联操作等。 ...

    Hibernate最新中文教程

    - **异常处理**:掌握常见的 Hibernate 异常及其解决方法。 - **配置问题**:排查配置文件错误,确保正确配置数据库连接参数。 - **查询优化**:使用合适的查询方式和索引策略,避免全表扫描。 ### 结语 通过上述...

    hibernate中文参考文档

    - **HibernateException**: 所有Hibernate异常的基类。 - **SQLGrammarException**: 表示SQL语法错误。 - **ConstraintViolationException**: 表示违反了数据库约束。 #### 九、性能优化技巧 - **批处理**: 通过...

    java错误大全(包括基本异常和开源框架出现的异常)

    6. **Hibernate异常:** - `MappingNotFoundException`:Eclipse项目中未刷新,或者映射文件不在指定目录。 - `HibernateException`: 如果`hibernate.cfg.xml`未在根目录下,或配置解析失败,这可能导致数据库连接...

    hibernate参考手册中文版

    - **异常处理**:了解Hibernate提供的异常层次结构,正确捕获并处理Hibernate异常。 - **日志配置**:合理配置日志级别,有助于调试和性能分析。 - **国际化支持**:利用Spring等框架集成Hibernate,实现国际化界面...

    《企业应用架构设计-Struts2 Hibernate3 Spring 2》谢星星 第十九章整合源码

    - **Struts2-Hibernate集成**:Struts2可以通过Hibernate插件,利用SessionFactory和Session来执行数据库操作,同时可以将Hibernate异常转换为Struts2的ActionError,方便统一处理。 - **Spring-Hibernate集成**:...

    解决各种java 异常的方法

    7. **Hibernate异常处理**:在使用Hibernate进行数据操作时,可能会遇到如`HibernateException`、`ConstraintViolationException`等。理解Hibernate的异常体系和如何适当地捕获处理这些异常对于保证数据操作的稳定性...

Global site tag (gtag.js) - Google Analytics