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"
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
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:
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)
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.