'Failed to read schema document' error is thrown when building a BPMN2 process in Business Central for JBoss BxMS 6
Environment
- Red Hat JBoss BRMS (BRMS)
- 6.1.0
- Red Hat JBoss BPM Suite (BPMS)
- 6.1.0
Issue
- While migrating a BPMN2 file designed from
DROOLS 5.6 Finalcommunity version toBPMS 6.1.0orBRMS 6.1.0and building it's project inBusiness Centralthrows following schema related WARNING messages.
...
[WARNING] (null: 967, 64): schema_reference.4: Failed to read schema document 'http://www.omg.org/spec/DD/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
[WARNING] (null: 967, 64): schema_reference.4: Failed to read schema document 'http://www.omg.org/spec/DD/20100524/DC-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
...
- Which jar in
BPMS 6.1.0orBRMS 6.1.0contains theXSDfor previous namespace ?
Resolution
The valid XSD files are BPMNDI.xsd, DC.xsd and DI.xsd which are accepted as part of validating a BPMN2 process definition in BRMS or BPMS 6. These files exist inside jbpm-bpmn2-6.2.0.Final-redhat-4.jar. Hence, users facing such issues should modify their BPMN2 file's schemaLocation section like this to help the process definition built successfully.
...
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.omg.org/spec/BPMN/20100524/DI BPMNDI.xsd
http://www.omg.org/spec/DD/20100524/DC DC.xsd
http://www.omg.org/spec/DD/20100524/DI DI.xsd"
...
Moreover users do not need those schemaLocation entries for http://www.omg.org/spec/BPMN/20100524/DI, http://www.omg.org/spec/DD/20100524/DC and http://www.omg.org/spec/DD/20100524/DI to be used by process designer.
e.g.
...
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd"
...
So it is recommended users to just remove those 3 schemaLocation entries from their BPMN2 files.
Root Cause
- These are the WARNING messages which are of major concern:
[WARNING] (null: 966, 168): schema_reference.4: Failed to read schema document 'http://www.omg.org/spec/BPMN/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
[WARNING] (null: 967, 64): schema_reference.4: Failed to read schema document 'http://www.omg.org/spec/DD/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
[WARNING] (null: 967, 64): schema_reference.4: Failed to read schema document 'http://www.omg.org/spec/DD/20100524/DC-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
The WARNING tells that these URLs are not accessible as schema locations. These locations might have bee defined or hard coded in bpmn2 files like this while they were designed in any editor.
...
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI-XMI
http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC-XMI
http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI-XMI"
...
- The latter parts (***-XMI) are the root cause of the problem because those URLs should be valid
XSDs.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
