incompatible type error when using Alfresco or CMIS connector

Description

The error below is thrown wehenever using an alfresco Connector or any other Connector that depends on stax-***.jar
and when there is a variable of type 'java object' somewhere in the process.

"Trying to set variable "legal_forms" with incompatible type: com.ctc.wstx.stax.WstxOutputFactory cannot be cast to javax.xml.stream.XMLOutputFactory"

Environment

Any

External Link

None

Workaround

none

Activity

Show:
Michael Eberli
December 1, 2014, 10:56 AM

I still get an error when adding Alfresco 4.2 FileUpload Connector in Bonita 6.3.8.

Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
... 61 more
Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not a subtype
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$300(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.xml.stream.FactoryFinder$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 61 more

Philippe Ozil
December 1, 2014, 4:03 PM

Hi,

Thanks for the update, I am re-opening this ticket.

Could you please try the recommended procedure related to "Duplicate libraries" from this documentation article:
http://documentation.bonitasoft.com/manage-jar-files

Cheers,

Michael Eberli
December 1, 2014, 7:36 PM

I cannot find a description for a procedure to solve this issue there.
It says ''this should be placed in a shared library" without telling how to do that.
But removing geronimo-stax-api_1.0_spec-n.jar from the dependencies of the connector solves the issue. (after a restart of Bonita Studio)

Philippe Ozil
December 2, 2014, 8:13 AM

Hi,

Sorry if the documentation is not clear enough on this point, I will ask for an update.

What this means is that you should avoid duplicated libraries as this will cause conflict.
To do that, you should embed them at the server level ("TOMCAT/lib" folder for example) and remove them from the processes dependencies.

Cheers,

Assignee

Philippe Ozil

Reporter

Michael Eberli

Affects versions

Reference

BS-8096

Fix versions

Configure