cancel
Showing results for 
Search instead for 
Did you mean: 

Exception: Data too long for column 'serializable_valu

bparis
Champ in-the-making
Champ in-the-making
Hi,

Preamble: the following problem does NOT appear on our test server running alfresco 2.1.2 and mySQL version 5.0.37-log.

We use alfresco 2.0.1 on RHEL with mysql Ver 14.12 Distrib 5.0.41 on our production system.
We have been modified the LDAPAuthenticationComponentImpl in order to use our LDAP server for authentication. 
Once authenticated, we create - on the fly - the person in alfresco (personService.createPerson()).  We add this person (authorityService.addAuthority(auth, userName) ) in all the groups the ldap reports it is member of, if the froup does not already exists, we create it (authorityService.createAuthority()).

We have already thouzands of users and several hundreds of groups.
This is ok, it works very fine, but with some users we get the following exception after the person and groups have been created.  Of course, due to the exception, the new created user and groups it belongs to are not recorded into alfresco, but - as my code runs until its end - I think the personService.createPerson(), authorityService.createAuthority() and authorityService.addAuthority(auth, userName) works all ok: the exception is thrown when the commit is tried to be done.  Perhaps there is a problem because some users are to be recorded in many groups, and there are some times several groups to create.

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:202)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
        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.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.flush(HibernateNodeDaoServiceImpl.java:281)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.flush(AlfrescoTransactionSupport.java:569)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:630)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:657)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:482)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy21.authenticate(Unknown Source)
        at org.alfresco.repo.webservice.authentication.AuthenticationWebService.startSession(AuthenticationWebService.java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:542)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        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:595)
Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'serializable_value' at row 1
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
        … 48 more


:arrow: A similar Exeption (perhaps more explicit) appears some times (but not all the times) when trying to create new groups with
authorityService.createAuthority(AuthorityType.GROUP, parent_group_auth , a_new_imported_groupName);
It seems this appear when the user is a member of lot of groups, because until now all our groups (hundreds) have been created this way with no problem.

The exception is:
javax.faces.FacesException: Error calling action method of component with id loginForm:submit
caused by:
javax.faces.el.EvaluationException: Exception while invoking expression #{LoginBean.login}
caused by:
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [update alf_node_properties set actual_type=?, multi_valued=?, persisted_type=?, boolean_value=?, long_value=?, float_value=?, double_value=?, string_value=?, serializable_value=? where node_id=? and qname=?]; SQL state [01004]; error code [0]; Data truncation: Data too long for column 'serializable_value' at row 1; nested exception is java.sql.BatchUpdateException: Data truncation: Data too long for column 'serializable_value' at row 1
caused by:
java.sql.BatchUpdateException: Data truncation: Data too long for column 'serializable_value' at row 1


Any help should be appreciated… 
Bernard
6 REPLIES 6

bparis
Champ in-the-making
Champ in-the-making
it's seems to me Alfresco creates a data field very too big to simply fit into the serialized_value column (type blob, which is 256k as I undestand in mySQL).
Is it possible ?

bernard

bparis
Champ in-the-making
Champ in-the-making
To make my problem clearer here is a simple example of the problem with alfreco 2.1.2.
This code runs OK for lot of users but fails for some others, I really don't unserstand…
It can succeeds with 10 or more groups, or fails with 2 groups, ….   :evil:
I get an Exception later (the whole loop complete successfully) when it's time to commit.  Could some one explain me what to do :

the simple code:

          Vector<String> user_authorities = new Vector<String>();
           user_authorities.add("GROUP_str-aust");
           user_authorities.add("GROUP_str-sc");
           user_authorities.add("GROUP_str-atuc");
           …..
           for (String an_auth: user_authorities ) {
                logger.debug("\tnew group to add into: " + an_auth );
                authorityService.addAuthority(an_auth, userName);
            }
and the result:
The following exception arrives AFTER the loop is completed if the Vecotr is too long (about more than only some elements)

2008-05-15 14:32:40,669 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:560) - ————————————
2008-05-15 14:32:40,670 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-aust
2008-05-15 14:32:40,707 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-sc
2008-05-15 14:32:40,746 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-atuc
2008-05-15 14:32:40,879 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-biol
2008-05-15 14:32:40,908 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-bani
2008-05-15 14:32:40,972 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_str-pror
2008-05-15 14:32:41,051 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_pbl-personnel
2008-05-15 14:32:41,113 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_pbl-alumni
2008-05-15 14:32:42,182 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-bex
2008-05-15 14:32:42,611 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-bologn
2008-05-15 14:32:42,948 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-buda
2008-05-15 14:32:42,980 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-cac
2008-05-15 14:32:43,005 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-cadm
2008-05-15 14:32:43,034 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-cefo
2008-05-15 14:32:43,166 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-coda
2008-05-15 14:32:43,192 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-cofc
2008-05-15 14:32:43,218 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-crect
2008-05-15 14:32:43,245 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-lyc
2008-05-15 14:32:43,363 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_mnd-pror
2008-05-15 14:32:43,389 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_grp-bi
2008-05-15 14:32:43,414 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_grp-dic-revue-presse
2008-05-15 14:32:43,441 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_prj-n-ucl-conseil-rectoral
2008-05-15 14:32:43,559 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_prj-n-ucl-etudes
2008-05-15 14:32:43,583 DEBUG (LDAPAuthenticationComponentImpl_ucl.java:565) -  new group to add into:  GROUP_prj-n-ucl-gt
2008-05-15 14:32:43,793 ERROR (StandardWrapperValve.java:250) - Servlet.service() for servlet Faces Servlet threw exception
java.sql.BatchUpdateException: Data truncation: Data too long for column 'serializable_value' at row 1
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
        at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:218)
        at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1341)
        at org.hibernate.action.CollectionUpdateAction.execute(CollectionUpdateAction.java:56)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
        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.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:654)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy19.authenticate(Unknown Source)
        at org.alfresco.web.bean.LoginBean.login(LoginBean.java:248)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)


…….

andy
Champ on-the-rise
Champ on-the-rise
Hi

This is a known issue and can be tracked on Jira.

Andy

ymartin
Champ in-the-making
Champ in-the-making
Hello Andy,
I have just setup synchronisation with a large LDAP (14430 users and 2945 groups) and the group synchronisation fails with the same error:

Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 16914; column 29 due to error: JDBC exception on Hibernate data
access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:190)
[…]
Caused by: org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.Ge
nericJDBCException: Could not execute JDBC batch update
        at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636)
[…]
Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'serializable_value' at row 1
        at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:657)

And the users synchronisation fails with MySQL lock errors:

12:04:53,495 ERROR [org.quartz.core.ErrorLogger] Job (DEFAULT.ldapPeopleJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.repo.importer.ExportSourceImporterException: Failed to import]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
[…]
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 12; column 16 due to error: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#25104]; nested exception is org.hibernate.exception.LockAcquisitionException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#25104]
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:190)
[…]
Caused by: org.springframework.dao.CannotAcquireLockException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#25104]; nested exception is org.hibernate.exception.LockAcquisitionException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#25104]
   at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:633)
[…]
Caused by: org.hibernate.exception.LockAcquisitionException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#25104]
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:82)
[…]
Caused by: com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1160)

Then the Tomcat server does not shutdown properly… the process must be killed.

May you please post references to JIRA tickets concerning these LDAP synchrosations issues ? Thank you in advance

Yves

ymartin
Champ in-the-making
Champ in-the-making
MySQL lock errors come from a mistake in cron expression to trigger user import job.
Forget it. Sorry.

Yves

ymartin
Champ in-the-making
Champ in-the-making
I have found the following ticket that match exactly that group import issue: https://issues.alfresco.com/jira/browse/AR-1391
Is there any known work-around to get the import work ?