cancel
Showing results for 
Search instead for 
Did you mean: 

'Could not execute JDBC batch update' error

edgar
Champ in-the-making
Champ in-the-making
When I try to all my changed resources in my Web Project through the default Web Site Submission workflow I get a "Could not execute JDBC batch update" error.

From the alfresco.log file:

13:54:23,782 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
Caused by:
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
   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:298)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
   at org.alfresco.repo.avm.hibernate.AVMNodeDAOHibernate.flush(AVMNodeDAOHibernate.java:175)
   at org.alfresco.repo.avm.PlainDirectoryNodeImpl.putChild(PlainDirectoryNodeImpl.java:281)
   at org.alfresco.repo.avm.AVMStoreImpl.createSnapshot(AVMStoreImpl.java:234)
   at org.alfresco.repo.avm.AVMRepository.createSnapshot(AVMRepository.java:812)
   at org.alfresco.repo.avm.AVMServiceImpl.createSnapshot(AVMServiceImpl.java:620)
   at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)

Admittedly, it is quite a large batch: 27MB in all (largely due to a number of PDF files). Could that be the problem?

This is in Alfresco 2.1.0RC1 on Windows with all default settings (HSQL).

regards,

Edgar
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The default HSQL is really on for playing with Alfresco and testing out the features. You should move to MySQL or another DB for any significant work - you won't get these problems then.

Thanks,

Kevin

davidc
Star Contributor
Star Contributor
This bug has now been investigated and oddly enough will be found on most databases except MySQL.  A fix will go into HEAD today.

kvc
Champ in-the-making
Champ in-the-making
As a quick follow-up on Dave's behalf, who just checked in the fix for this into HEAD.  It will be rolled into our updated Community build within the next two weeks.

Fix to fix for JBPM unique constraint issue.  SQL should work against all DBs now.
———————————————————————————-

                 Key: CHK-771
                 URL: http://issues.alfresco.com/browse/CHK-771
             Project: Check In
          Issue Type: Check In
      HEAD or Branch: HEAD
          Components: Installation

–Overview–
Fix to fix for JBPM unique constraint issue.  SQL should work against all DBs now.

You should no longer get:

15:18:26,524 ERROR [domain.schema.SchemaBootstrap] Statement
execution failed:
    SQL:  UPDATE JBPM_PROCESSINSTANCE SET KEY_ = '' || ID_ WHERE KEY_
IS NULL
    Error: Duplicate entry '1-5' for key 2