Download document CMIS connector

Hi,

I’m trying to download a document from an Alfresco repository using CMIS connector.

Upload new document version connector is working so i used the same parameters to download the document.

When i try to set the documentValue returned by the connector to a pool document, i get the following error :

This is the bonita log :

2014-07-11 11:28:16 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork WARNING: THREAD_ID=87 | HOSTNAME=STAGIAIRE-T2-PC | TENANT_ID=1 | The work [ExecuteConnectorOfActivity: flowNodeInstanceId = 138, connectorDefinitionName = dfgdfg] failed. The failure will be handled. 2014-07-11 11:28:16 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork WARNING: THREAD_ID=87 | HOSTNAME=STAGIAIRE-T2-PC | TENANT_ID=1 | org.bonitasoft.engine.transaction.STransactionCommitException : "PROCESS_DEFINITION_ID=7862587834632680660 | PROCESS_NAME=DOWNLOAD | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=42 | ROOT_PROCESS_INSTANCE_ID=42 | FLOW_NODE_DEFINITION_ID=-8838041857039480880 | FLOW_NODE_INSTANCE_ID=138 | FLOW_NODE_NAME=Copie de DOWNLOAD DOCUMENT | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=dfgdfg | CONNECTOR_INSTANCE_ID=97 | bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback"

This is the catalina log :

2014-07-11 11:28:14 org.apache.chemistry.opencmis.commons.impl.XMLUtils WARNING: You are using an unsupported StAX parser. 2014-07-11 11:28:14 org.apache.chemistry.opencmis.commons.impl.XMLUtils WARNING: You are using an unsupported StAX parser. 2014-07-11 11:28:15 com.sun.xml.internal.ws.client.RequestContext WARNING: BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective, Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature 2014-07-11 11:28:15 com.sun.xml.internal.ws.client.RequestContext WARNING: BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective, Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature 2014-07-11 11:28:16 com.sun.xml.internal.ws.client.RequestContext WARNING: BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective, Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature 2014-07-11 11:28:16 org.hibernate.engine.jdbc.spi.SqlExceptionHelper WARN: SQL Error: 22001, SQLState: 22001 2014-07-11 11:28:16 org.hibernate.engine.jdbc.spi.SqlExceptionHelper ERROR: Value too long for column "DOCUMENTCONTENTMIMETYPE VARCHAR_IGNORECASE(50)": "CAST('application/vnd.openxmlformats-officedocument.wordprocessingml.document' AS VARCHAR_IGNORECASE) (71)"; SQL statement: insert into document_mapping (processinstanceid, documentName, documentAuthor, documentCreationDate, documentHasContent, documentContentFileName, documentContentMimeType, contentStorageId, documentURL, tenantid, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [22001-170] 2014-07-11 11:28:16 org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl ERROR: HHH000346: Error during managed flush [could not execute statement] 2014-07-11 11:28:16 org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl ERROR: HHH000352: Unable to release batch statement... 2014-07-11 11:28:16 org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl ERROR: HHH000246: SQLException escaped proxy org.h2.jdbc.JdbcSQLException: The object is already closed [90007-170] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.message.DbException.get(DbException.java:135) at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:928) at org.h2.jdbc.JdbcPreparedStatement.checkClosed(JdbcPreparedStatement.java:1514) at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:904) at org.h2.jdbc.JdbcPreparedStatement.clearBatch(JdbcPreparedStatement.java:1053) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64) at com.sun.proxy.$Proxy215.clearBatch(Unknown Source) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:171) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:205) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:183) at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:292) at org.hibernate.internal.SessionImpl.close(SessionImpl.java:354) at org.hibernate.internal.SessionImpl.managedClose(SessionImpl.java:422) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.doAfterCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:138) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorTrackingImpl.afterCompletion(SynchronizationCallbackCoordinatorTrackingImpl.java:88) at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.afterCompletion(RegisteredSynchronization.java:61) at bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:549) at bitronix.tm.BitronixTransaction.rollback(BitronixTransaction.java:336) at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:240) at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.commit(JTATransactionServiceImpl.java:153) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.complete(JTATransactionServiceImpl.java:144) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:292) at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:128) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:70) at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56) at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47) at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)

It seems to have a problem with the mime-type of the document being too long. So we can’t download .docx documents with the CMIS connector ?

Is it possible to modify the column DOCUMENTCONTENTMIMETYPE directly in the database ?

This issue was fixed in 6.3.3. Please, try to upgrade and confirm the resolution.