Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/Users/Talend/AppData/Local/Temp/tempBusinessArchive4367027096108612194tmp/process-design.xml; lineNumber: 1; columnNumber: 205; cvc-elt.1: Cannot find the declaration of element 'processDefiniti

we are using bonita engine api, and run the sample code from : https://github.com/bonitasoft/bonita-examples, it’s ok, but it fail after we change the code a little like that:

– DesignProcessDefinition designProcessDefinition = buildProcessDefinition();
– ProcessDefinition processDefinition = getProcessAPI(session).deploy(designProcessDefinition);

++ BusinessArchive businessArchive = BusinessArchiveFactory.readBusinessArchive(new File(“C:/Users/Talend/Desktop/login–1.0.bar”));

++ ProcessDefinition processDefinition = getProcessAPI(session).deploy(businessArchive);

and we think the changeset is ok as your document is clear for it : http://documentation.bonitasoft.com/deploy-process

The exception come from :

BusinessArchive businessArchive = BusinessArchiveFactory.readBusinessArchive(new File(“C:/Users/Talend/Desktop/login–1.0.bar”));

the exception :

Exception in thread “main” org.bonitasoft.engine.bpm.bar.InvalidBusinessArchiveFormatException: javax.xml.bind.ValidationException

  • with linked exception:
    [org.xml.sax.SAXParseException; systemId: file:/C:/Users/Talend/AppData/Local/Temp/tempBusinessArchive2686920543904810274tmp/process-design.xml; lineNumber: 1; columnNumber: 205; cvc-elt.1: Cannot find the declaration of element ‘processDefinition’.]
    at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.deserializeProcessDefinition(ProcessDefinitionBARContribution.java:229)
    at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.readFromBarFolder(ProcessDefinitionBARContribution.java:202)
    at org.bonitasoft.engine.bpm.bar.BusinessArchiveFactory.readBusinessArchive(BusinessArchiveFactory.java:68)
    at org.bonitasoft.engine.bpm.bar.BusinessArchiveFactory.readBusinessArchive(BusinessArchiveFactory.java:109)
    at org.bonitasoft.example.App.deployProcess(App.java:221)
    at org.bonitasoft.example.App.main(App.java:121)
    Caused by: javax.xml.bind.ValidationException
  • with linked exception:
    [org.xml.sax.SAXParseException; systemId: file:/C:/Users/Talend/AppData/Local/Temp/tempBusinessArchive2686920543904810274tmp/process-design.xml; lineNumber: 1; columnNumber: 205; cvc-elt.1: Cannot find the declaration of element ‘processDefinition’.]
    at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:178)
    at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:167)
    at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.deserializeProcessDefinition(ProcessDefinitionBARContribution.java:224)
    … 5 more
    Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/Users/Talend/AppData/Local/Temp/tempBusinessArchive2686920543904810274tmp/process-design.xml; lineNumber: 1; columnNumber: 205; cvc-elt.1: Cannot find the declaration of element ‘processDefinition’.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
    at javax.xml.validation.Validator.validate(Unknown Source)
    at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:176)
    … 7 more

it seems that it’s a bonita bug, can you make sure it or show us a solution?