ENGINE-09003 Could not parse

Hi everyone, we are getting following error

ENGINE-09003 Could not parse
org.camunda.bpm.engine.ProcessEngineException: ENGINE-09003 Could not parse ‘employee.bpmn’. SAX feature ‘http://xml.org/sax/features/external-general-entities’ not supported.

its working fine with postgresql but facing issue with Oracle(19C).

Please help , does it supported in oracle or not , or any alternative is there .
Camunda Version: 7.13

Can you upload the model and maybe explain a little bit about how you created it.

Thanks for quick response . We have 2 models, we are calling below child model from main model. please find below child model

        <?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" id="Definitions_0sfohwf" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
  <bpmn:process id="orderProcess" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1">
      <bpmn:outgoing>Flow_08xlvav</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_08xlvav" sourceRef="StartEvent_1" targetRef="Activity_0l5attc" />
    <bpmn:sequenceFlow id="Flow_0g1diq3" sourceRef="Activity_0l5attc" targetRef="Gateway_0if4647" />
    <bpmn:sequenceFlow id="Flow_1r7if1q" sourceRef="Activity_00srb9x" targetRef="Gateway_0jes17x" />
    <bpmn:endEvent id="Event_0l5pc2d">
      <bpmn:incoming>Flow_0j5zm1f</bpmn:incoming>
      <bpmn:incoming>Flow_0lg7e1s</bpmn:incoming>
      <bpmn:incoming>Flow_1ew7x1c</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1aaiyuz" sourceRef="Activity_1sy4tiu" targetRef="Gateway_16x92al" />
    <bpmn:serviceTask id="Activity_0l5attc" name="Check Detail" camunda:class="ae.order.vip.workflow.delegates.DetailCheckDelegate">
      <bpmn:extensionElements>
        <camunda:executionListener delegateExpression="#{orderStateListener}" event="end" />
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_08xlvav</bpmn:incoming>
      <bpmn:outgoing>Flow_0g1diq3</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Activity_00srb9x" name="Is Delivery Order" camunda:class="ae.order.vip.workflow.delegates.DeliveryDelegate">
      <bpmn:incoming>Flow_1uy69q4</bpmn:incoming>
      <bpmn:outgoing>Flow_1r7if1q</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Activity_1sy4tiu" name="Is TakeAway Order" camunda:class="ae.order.vip.workflow.delegates.TakeAwayDelegate">
      <bpmn:incoming>Flow_0y295wr</bpmn:incoming>
      <bpmn:outgoing>Flow_1aaiyuz</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="Gateway_0if4647">
      <bpmn:incoming>Flow_0g1diq3</bpmn:incoming>
      <bpmn:outgoing>Flow_1uy69q4</bpmn:outgoing>
      <bpmn:outgoing>Flow_0j5zm1f</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_1uy69q4" sourceRef="Gateway_0if4647" targetRef="Activity_00srb9x">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!isDetailed}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_0j5zm1f" sourceRef="Gateway_0if4647" targetRef="Event_0l5pc2d">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{isDetailed}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:exclusiveGateway id="Gateway_0jes17x">
      <bpmn:incoming>Flow_1r7if1q</bpmn:incoming>
      <bpmn:outgoing>Flow_0y295wr</bpmn:outgoing>
      <bpmn:outgoing>Flow_0lg7e1s</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_0y295wr" sourceRef="Gateway_0jes17x" targetRef="Activity_1sy4tiu">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!isDelivery}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_0lg7e1s" sourceRef="Gateway_0jes17x" targetRef="Event_0l5pc2d">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{isDelivery}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:exclusiveGateway id="Gateway_16x92al" default="Flow_1ew7x1c">
      <bpmn:incoming>Flow_1aaiyuz</bpmn:incoming>
      <bpmn:outgoing>Flow_1ew7x1c</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_1ew7x1c" sourceRef="Gateway_16x92al" targetRef="Event_0l5pc2d" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="orderProcess">
      <bpmndi:BPMNEdge id="Flow_08xlvav_di" bpmnElement="Flow_08xlvav">
        <di:waypoint x="188" y="117" />
        <di:waypoint x="240" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0g1diq3_di" bpmnElement="Flow_0g1diq3">
        <di:waypoint x="340" y="117" />
        <di:waypoint x="375" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1r7if1q_di" bpmnElement="Flow_1r7if1q">
        <di:waypoint x="560" y="117" />
        <di:waypoint x="605" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1uy69q4_di" bpmnElement="Flow_1uy69q4">
        <di:waypoint x="425" y="117" />
        <di:waypoint x="460" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0j5zm1f_di" bpmnElement="Flow_0j5zm1f">
        <di:waypoint x="400" y="142" />
        <di:waypoint x="400" y="240" />
        <di:waypoint x="1000" y="240" />
        <di:waypoint x="1000" y="70" />
        <di:waypoint x="950" y="70" />
        <di:waypoint x="950" y="99" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1aaiyuz_di" bpmnElement="Flow_1aaiyuz">
        <di:waypoint x="790" y="117" />
        <di:waypoint x="835" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0y295wr_di" bpmnElement="Flow_0y295wr">
        <di:waypoint x="655" y="117" />
        <di:waypoint x="690" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0lg7e1s_di" bpmnElement="Flow_0lg7e1s">
        <di:waypoint x="630" y="142" />
        <di:waypoint x="630" y="200" />
        <di:waypoint x="950" y="200" />
        <di:waypoint x="950" y="135" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1ew7x1c_di" bpmnElement="Flow_1ew7x1c">
        <di:waypoint x="885" y="117" />
        <di:waypoint x="932" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Gateway_0if4647_di" bpmnElement="Gateway_0if4647" isMarkerVisible="true" bioc:stroke="rgb(142, 36, 170)" bioc:fill="rgb(225, 190, 231)">
        <dc:Bounds x="375" y="92" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0rjftmx_di" bpmnElement="Activity_00srb9x" bioc:stroke="rgb(251, 140, 0)" bioc:fill="rgb(255, 224, 178)">
        <dc:Bounds x="460" y="77" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_16x92al_di" bpmnElement="Gateway_16x92al" isMarkerVisible="true" bioc:stroke="rgb(142, 36, 170)" bioc:fill="rgb(225, 190, 231)">
        <dc:Bounds x="835" y="92" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0n0mprc_di" bpmnElement="Activity_1sy4tiu" bioc:stroke="rgb(30, 136, 229)" bioc:fill="rgb(187, 222, 251)">
        <dc:Bounds x="690" y="77" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0l5pc2d_di" bpmnElement="Event_0l5pc2d" bioc:stroke="rgb(30, 136, 229)" bioc:fill="rgb(187, 222, 251)">
        <dc:Bounds x="932" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0w7m0h4_di" bpmnElement="Activity_0l5attc" bioc:stroke="rgb(229, 57, 53)" bioc:fill="rgb(255, 205, 210)">
        <dc:Bounds x="240" y="77" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1" bioc:stroke="rgb(30, 136, 229)" bioc:fill="rgb(187, 222, 251)">
        <dc:Bounds x="152" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_0jes17x_di" bpmnElement="Gateway_0jes17x" isMarkerVisible="true" bioc:stroke="rgb(142, 36, 170)" bioc:fill="rgb(225, 190, 231)">
        <dc:Bounds x="605" y="92" width="50" height="50" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

We do support Oracle 19c - you can see the supported environments here. So it’s likely that this isn’t an issue.
Can you explain what exactly causes the error and what process you followed when moving from postgres to oracle.

we just moved datasource and let camunda to create tables same as it was working in postgresql.
camunda.bpm.database.type=oracle
camunda.bpm.filter.create=All tasks

we are getting following exception

Caused by: javax.xml.parsers.ParserConfigurationException: SAX feature '[http://xml.org/sax/features/external-general-entities'](http://xml.org/sax/features/external-general-entities%27) not supported.
at oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:272)
at org.camunda.bpm.engine.impl.util.xml.Parse.execute(Parse.java:143)
... 83 common frames omitted

Did you add the correct drivers and setup the datasource?

yes, Drivers and Datasource are correct, as tables were created successfully. once the tables were created. it is throwing this error.

hi @Niall any idea how to resolve this issue?

Hi @ranakamran,

In the XML of employee.bpmn you are referencing an XML External Entity. By default, processing XML External Entities is disabled due to security concerns. You can read more about it in our Security Instructions and on OWASP.

If you know what you are doing, you can set the process engine configuration flag enableXxeProcessing to true. However, please review this action carefully since it could make your process application and workflow execution platform vulnerable to attackers.

Best,
Tassilo

1 Like

Judging by the error message, I think this is rather a problem with the Sax parser (and therefore probably the JDK that ships it) that doesn’t support this particular security feature. So the question is: What Java version and JDK vendor/version do you use?

I’m also pretty sure this has nothing to do with the fact that you are using Oracle database.

we are using openJDK 11

Hi @ranakamran,

some older Oracle JDBC drivers (e.g., com.oracle.database.jdbc:ojdbc8:18.3.0.0) have an optional transitive dependency to com.oracle.database.xml:xmlparserv2. This library comes with oracle.xml.jaxp.JXSAXParserFactory which seems to not support the security feature external-general-entities. Could you try to remove xmlparserv2 from your libraries folder?

Best,
Tassilo

2 Likes

I use Gradle to pull the Oracle driver into my Docker image. I had the problem described when I used the incorrect coordinates com.oracle.database.jdbc:ojdbc8-production:21.1.0.0 which is a parent POM that has a dependency on xmlparserv2. I think it would have work to change it to com.oracle.database.jdbc:ojdbc8:21.1.0.0, but I decided that reverting to com.oracle.database.jdbc:ojdbc8:18.3.0.0 was a better idea, and that worked for me.

Ken

1 Like

Hi Ranakamran,
Did your issue got resolved? I am also facing same issue therefore I am wondering is this issue is common while shifting database from A to B.

Regards
-Manash