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

1
0
-1

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:

  1. -- DesignProcessDefinition designProcessDefinition = buildProcessDefinition();
  2. -- ProcessDefinition processDefinition = getProcessAPI(session).deploy(designProcessDefinition);
  3.  
  4. ++ BusinessArchive businessArchive = BusinessArchiveFactory.readBusinessArchive(new File("C:/Users/Talend/Desktop/login--1.0.bar"));
  5.  
  6. ++ 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 :

  1. BusinessArchive businessArchive = BusinessArchiveFactory.readBusinessArchive(new File("C:/Users/Talend/Desktop/login--1.0.bar"));

the exception :

  1. Exception in thread "main" org.bonitasoft.engine.bpm.bar.InvalidBusinessArchiveFormatException: javax.xml.bind.ValidationException
  2. - with linked exception:
  3. [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'.]
  4. at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.deserializeProcessDefinition(ProcessDefinitionBARContribution.java:229)
  5. at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.readFromBarFolder(ProcessDefinitionBARContribution.java:202)
  6. at org.bonitasoft.engine.bpm.bar.BusinessArchiveFactory.readBusinessArchive(BusinessArchiveFactory.java:68)
  7. at org.bonitasoft.engine.bpm.bar.BusinessArchiveFactory.readBusinessArchive(BusinessArchiveFactory.java:109)
  8. at org.bonitasoft.example.App.deployProcess(App.java:221)
  9. at org.bonitasoft.example.App.main(App.java:121)
  10. Caused by: javax.xml.bind.ValidationException
  11. - with linked exception:
  12. [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'.]
  13. at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:178)
  14. at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:167)
  15. at org.bonitasoft.engine.bpm.bar.ProcessDefinitionBARContribution.deserializeProcessDefinition(ProcessDefinitionBARContribution.java:224)
  16. ... 5 more
  17. 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'.
  18. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  19. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
  20. at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
  21. at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
  22. at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
  23. at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
  24. at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
  25. at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  26. at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
  27. at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
  28. at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
  29. at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
  30. at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
  31. at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  32. at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  33. at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  34. at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
  35. at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
  36. at javax.xml.validation.Validator.validate(Unknown Source)
  37. at org.bonitasoft.engine.io.xml.XMLHandler.validate(XMLHandler.java:176)
  38. ... 7 more

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

No answers yet.
Notifications