Bar File Deployment with BOM does not work

cancel
Showing results for 
Search instead for 
Did you mean: 
frauke_heyl
Active Member

Bar File Deployment with BOM does not work

Hello,

I have a BAR file which contains a BPMN file, which is UTF-8 encoded with a BOM.

With our old Activiti version 5.11 deployment worked with that BAR file, but now after updating to Activiti 5.22.0 I get a BPMN parse error:

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content ist nicht zulässig in Prolog.
    at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:596) ~[?:1.8.0_121]
    at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:309) ~[activiti-bpmn-converter-5.22.0.jar:5.22.0]

Looking into it with a HEX Editor revealed the BOM.

Is there a workaround to make the deployment more tolerant, like the old one was?

Thank you for any help!

Best regards

Frauke

1 Reply
ryandawson
Alfresco Employee

Re: Bar File Deployment with BOM does not work

It could be a xerces behaviour as the xerces version changed ( Activiti/pom.xml at activiti-5.11 · Activiti/Activiti · GitHub  vs Activiti/pom.xml at 5.22.0-release · Activiti/Activiti · GitHub  ) but I would think it's more likely about how the XML stream is created. It looks from some quick searching like in 5.11 the encoding was explicitly specified at creation (Activiti/AbstractConverterTest.java at activiti-5.11 · Activiti/Activiti · GitHub ) and it seems like it isn't in 5.22 (Activiti/BpmnXMLConverter.java at 6.0-release · Activiti/Activiti · GitHub ). So I'd suggest looking at that. I suspect it would be a code change to alter that behaviour.