Upload a file from Bonita to Alfresco

1
0
-1

Hello,

I would like to upload a file from Bonita to Alfresco. To do it, I have a simple process. A start event, a service task and an end event. I have created a document (test.jpg) on the pool. For the service task I have a connector with the following parameters:

Host: localhost Port: 8080 Name user: admin pwd: admin

File to sent: document1 (the one created before) Name of the file: toto Description: a file from Bonita to Alfresco Type mime: text/plain Destination folder: /alfresco/faces/jsp/browse/ ==> (I think that it is my mistake)

I would like to publish the document here: http://localhost:8080/alfresco/faces/jsp/browse/browse.jsp

Alfresco version: 4.2 Bonita version: 6.3.1 Community Connector version: Alfresco 4.2 download a file

Thank you for your help

Comments

Submitted by florian.baillagou on Tue, 09/02/2014 - 16:51

Hummm, if you don't give us the stack trace, we can't really help you :)

Submitted by sylvain.bailly on Tue, 09/02/2014 - 18:10

Sorry, but what is the "stack trace"?

Submitted by florian.baillagou on Wed, 09/03/2014 - 08:37

What is your problem ? You're explaining your method but not the problem encountered. Do you have any errors from the connector ? The document uploaded is not in the right alfresco folder ?

Submitted by sylvain.bailly on Wed, 09/03/2014 - 09:10

Sorry!

The file is not uploaded. It can't connect to Alfresco I think. I have the following logs:

Infos: THREAD_ID=50 | HOSTNAME=Maximus-PC | TENANT_ID=1 | The user <SBA> has deleted process with id = <5383857167589996130>
2014-09-03 09:09:19 org.bonitasoft.engine.api.impl.ProcessAPIImpl
Infos: THREAD_ID=50 | HOSTNAME=Maximus-PC | TENANT_ID=1 | The user <SBA> has installed process <Upload file in Alfresco> in version <1.0> with id <6136912067134066982>
2014-09-03 09:09:19 org.bonitasoft.engine.api.impl.transaction.process.EnableProcess
Infos: THREAD_ID=50 | HOSTNAME=Maximus-PC | TENANT_ID=1 | The user <SBA> has enabled process <Upload file in Alfresco> in version <1.0> with id <6136912067134066982>
2014-09-03 09:09:21 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita].[jsp]
Précis:  Disabling the response for futher output
2014-09-03 09:09:21 org.bonitasoft.engine.api.impl.ProcessStarter
Infos: THREAD_ID=88 | HOSTNAME=Maximus-PC | TENANT_ID=1 | The user <SBA> has started the process instance <8> of process <Upload file in Alfresco> in version <1.0> and id <6136912067134066982>
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: host localhost
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: port 8080
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: username admin
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: password adminpwd
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: fileObject document1
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: fileName documentTest
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: description a file from Bonita to Alfresco
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: destinationFolder null
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.UploadFileConnector
Infos: executing AlfrescoConnector with params: localhost:8080 admin:adminpwd
2014-09-03 09:09:21 org.bonitasoft.connectors.alfresco34.AlfrescoRestClient
Infos: uploadFileFromDocument documentName=document1 fileName=documentTest description=a file from Bonita to Alfresco mimeType=text/plain destinationFolder=/alfresco/faces/jsp/browse/
2014-09-03 09:09:21 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork
Avertissement: THREAD_ID=75 | HOSTNAME=Maximus-PC | TENANT_ID=1 | The work [ProcessInstanceContextWork: processInstanceId = 8] failed. The failure will be handled.
2014-09-03 09:09:21 org.bonitasoft.engine.execution.event.ErrorEventHandlerStrategy
Avertissement: THREAD_ID=75 | HOSTNAME=Maximus-PC | TENANT_ID=1 | No catch error event was defined to handle the error code 'Upload file in Alfresco impossible' defined in the process [name: Upload file in Alfresco, version: 1.0], throw event: Upload file in Alfresco impossible. This throw error event will act as a Terminate Event.
2014-09-03 09:09:21 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork
Avertissement: THREAD_ID=75 | HOSTNAME=Maximus-PC | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorException : "PROCESS_DEFINITION_ID=6136912067134066982 | PROCESS_NAME=Upload file in Alfresco | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=8 | ROOT_PROCESS_INSTANCE_ID=8 | FLOW_NODE_DEFINITION_ID=-7608210478600050949 | FLOW_NODE_INSTANCE_ID=23 | FLOW_NODE_NAME=Put in Alfresco | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=Upload file in Alfresco | CONNECTOR_INSTANCE_ID=8 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMFactory"

Picture of Alfresco services: http://www.hostingpics.net/viewer.php?id=9135901201.png

http://www.hostingpics.net/viewer.php?id=4399427602.png
Submitted by florian.baillagou on Wed, 09/03/2014 - 09:30

This problem is a known bug if I remember. Two libraries have the org.apache.abdera.parser.stax.FOMFactory class so he can't choose any. There's no real solution to fix this yet.

Could you use the CMIS connector instead of Alfresco connector ?

1 answer

1
0
-1

Hi, You should consult this recent documentation page: http://documentation.bonitasoft.com/product-bos-sp/manage-jar-files

Regards

Comments

Submitted by sylvain.bailly on Thu, 09/04/2014 - 09:41

Thanks, I will keep u informed.

Notifications