Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3716

Under Felix/OSGi, errors when adding BPMN2 resource: Failed to read schema document 'BPMN20.xsd'

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: jBPM 5.3
    • Fix Version/s: jBPM 6.4.0.CR2
    • Component/s: Runtime Engine
    • Labels:
      None
    • Environment:

      Karaf 2.2.8 + Felix 3.2.2
      Ubuntu 11.10 64-bit
      java version "1.6.0_31"
      Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

      Description

      To run jBPM under Karaf 2.2.8, first replace felix 3.0.9 with 3.2.2 so jbpm.bpmn2 bundle starts successfully. (see #JBPM-3715 / https://issues.apache.org/jira/browse/FELIX-3598 )

      However, upon loading the .bpmn file, several errors are output: (similar to #SWITCHYARD-394, but probably the cause is different)

      (null: 13, 54): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 13, 54): cvc-elt.1: Cannot find the declaration of element 'definitions'.
      (null: 15, 58): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 16, 98): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 18, 149): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 20, 24): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 24, 53): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 25, 69): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 28, 47): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 29, 43): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 30, 15): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 32, 35): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 33, 36): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 37, 62): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      (null: 38, 62): schema_reference.4: Failed to read schema document 'BPMN20.xsd', 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>.
      

      Despite the errors, the BPMN file is still loaded successfully and can start processes.

      Sample loading code: (very similar to example in jBPM 5.3 docs)

      private StatefulKnowledgeSession ksession;
      
      public OsgiBpmRepository(KnowledgeBuilderFactoryService kbuilderFactory,
      		KnowledgeBaseFactoryService kbaseFactory,
      		ResourceFactoryService resourceFactory) throws IOException {
      	KnowledgeBuilderConfiguration kbuilderConfig = 
      			kbuilderFactory.newKnowledgeBuilderConfiguration(null, getClass().getClassLoader());
      	KnowledgeBuilder kbuilder = kbuilderFactory.newKnowledgeBuilder(kbuilderConfig);
      	final String resourceName = "META-INF/hello.bpmn";
      	log.info("Loading classpath resource {}", resourceName);
      	kbuilder.add(resourceFactory.newClassPathResource(resourceName, getClass()),
      			ResourceType.BPMN2);
      	
      	KnowledgeBaseConfiguration kbaseConfig = 
      			kbaseFactory.newKnowledgeBaseConfiguration(null, getClass().getClassLoader());
      	KnowledgeBase kbase = kbaseFactory.newKnowledgeBase(kbaseConfig);
      	kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
      
      	ksession = kbase.newStatefulKnowledgeSession();
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  KrisVerlaenen Kris Verlaenen
                  Reporter:
                  ceefour Hendy Irawan
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated: