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'

XMLWordPrintable

      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();
      }
      

              kverlaen@redhat.com Kris Verlaenen
              HendyIrawan Hendy Irawan (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: