Hi everyone.
I need to store a process definition into the database from a sequence of SQLs. At MySQL I don’t have any problem, just some inserts (into ACT_RE_PROCDEF, ACT_RE_DEPLOYMENT, ACT_GE_BYTEARRAY), but at MsSql I am not able to insert the process into ACT_GE_BYTEARRAY in the correct format. Could you help me?
At mysql insert de XML of the process definition into BYTE_ works OK.
At MsSql nothing work, cast str as VARBINAY(MAX), cast str as IMAGE, etc.
Someone has tried?
Thanks in advance.
Error is:
org.camunda.bpm.engine.ProcessEngineException: ENGINE-03023 Could not load BPMN Model for process definition with id ‘demo:1:3’.
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.loadModelException(EnginePersistenceLogger.java:260)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.loadAndCacheBpmnModelInstance(DeploymentCache.java:233)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.findBpmnModelInstanceForProcessDefinition(DeploymentCache.java:206)
at org.camunda.bpm.engine.impl.ProcessDefinitionQueryImpl.addProcessDefinitionToCacheAndRetrieveDocumentation(ProcessDefinitionQueryImpl.java:318)
at org.camunda.bpm.engine.impl.ProcessDefinitionQueryImpl.executeList(ProcessDefinitionQueryImpl.java:309)
at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressionsAndExecuteList(AbstractQuery.java:186)
at org.camunda.bpm.engine.impl.AbstractQuery.execute(AbstractQuery.java:165)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.AbstractQuery.list(AbstractQuery.java:139)
at com.mycompany.testcamunda.MainTest.listProcessDefinitions(MainTest.java:116)
at com.mycompany.testcamunda.MainTest.main(MainTest.java:36)
Caused by: org.camunda.bpm.model.xml.ModelParseException: IOException while parsing input stream
at org.camunda.bpm.model.xml.impl.util.DomUtil.parseInputStream(DomUtil.java:244)
at org.camunda.bpm.model.xml.impl.parser.AbstractModelParser.parseModelFromStream(AbstractModelParser.java:65)
at org.camunda.bpm.model.bpmn.impl.BpmnParser.parseModelFromStream(BpmnParser.java:61)
at org.camunda.bpm.model.bpmn.Bpmn.doReadModelFromInputStream(Bpmn.java:234)
at org.camunda.bpm.model.bpmn.Bpmn.readModelFromStream(Bpmn.java:125)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.loadAndCacheBpmnModelInstance(DeploymentCache.java:229)
… 12 more
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 4-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:701)
Make sure the BLOBs that contain the process definition XML are correctly UTF-8-encoded when you insert them. According to the exception this is not the case.