Hello everybody!
I'm getting the following exception while creating an eneity named Employer.
Hibernate: insert into extenddb.EMPLOYER (EMPLOYERNAME, EMPLOYERSTATUS, EMPLOYERID) values (?, ?, ?)
Hibernate: insert into extenddb.EMPLOYERLOCATION (LOCATIONNAME, STREETADDRESS1, STREETADDRESS2, CITY, STATE, ZIPCODE, LOCATIONSTATUS, PHONENUMBER, CONTACTNAME, FEDERALID, CARRIERID, MAILINGADDRESS1, MAILINGADDRESS2, MAILINGCITY, MAILINGSTATE, MAILINGZIPCODE, LOCATIONID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -99999, SQLState: null
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -407, SQLState: 23502
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Error for batch element #0: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=5, COLNO=2
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -407, SQLState: 23502
Aug 21, 2003 5:43:57 AM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Error for batch element #1: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=5, COLNO=1
Aug 21, 2003 5:43:57 AM net.sf.hibernate.JDBCException <init>
SEVERE: Could not synchronize database state with session
com.ibm.db2.jcc.a.dg: Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
at com.ibm.db2.jcc.a.f.a(f.java:328)
at com.ibm.db2.jcc.a.cp.a(cp.java:2160)
at com.ibm.db2.jcc.a.cp.executeBatch(cp.java:1991)
at com.ibm.db2.jcc.a.cp.executeBatch(cp.java:1010)
at org.enhydra.jdbc.core.CorePreparedStatement.executeBatch(CorePreparedStatement.java:389)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:50)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:105)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:50)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:93)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:469)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2100)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2061)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2005)
at com.translogicsys.persistence.SessionTxManager.save(SessionTxManager.java:181)
at com.ateb.extend.employer.domain.Employer.save_aroundBody3$advice(Employer.java:32)
at com.ateb.extend.employer.domain.Employer.save(Employer.java)
at org.apache.jsp.modifyEmployerJunit_jsp._jspService(modifyEmployerJunit_jsp.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:263)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
java.lang.Exception: Exception in saving the entity: Could not synchronize database state with session: Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
at com.ateb.extend.employer.domain.Employer.save_aroundBody3$advice(Employer.java:36)
at com.ateb.extend.employer.domain.Employer.save(Employer.java)
at org.apache.jsp.modifyEmployerJunit_jsp._jspService(modifyEmployerJunit_jsp.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:263)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Aug 21, 2003 5:44:12 AM org.enhydra.jdbc.util.Logger info
INFO: GenericPool:cleanUp less than minSize objects in the pool
Aug 21, 2003 5:48:56 AM org.enhydra.jdbc.util.Logger info
INFO: GenericPool:cleanUp less than minSize objects in the pool
Employer as one-to-many relation with EmpoyerLocation and EmployerComment.
A record into employer is getting added.
I'm using DB2, Hibernate 2.1.1, Tomcat 4.1, and DB2 driver is DB2JCC of DB2 version 8.1.3.132. (com.ibm.db2.jcc.DB2Driver).
The same is entity model and the code worked with MySQL.
I tried to debug it but failed. (FYI: I'm using schema attribute in <hibernate-mapping>). The problem is with batch updates.
If anybody has a clue, please reply.
Thanks in advance.
- Jeevan (G1)
|