activiti部署失败,xml格式部署,String方式部署

[org.activiti.engine.impl.bpmn.deployer.BpmnDeployer]Processing resource hello.bpmn20.xml
org.activiti.engine.ActivitiException: Error parsing XML
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:74)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:134)
at com.buss.activiti.controller.ProcessGeneratorController.deployment(ProcessGeneratorController.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(UnkNown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnkNown Source)
at java.lang.reflect.Method.invoke(UnkNown Source)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
at org.springframework.web.servlet.dispatcherServlet.dodispatch(dispatcherServlet.java:923)
at org.springframework.web.servlet.dispatcherServlet.doService(dispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(UnkNown Source)
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:230)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
... 52 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 584; Invalid byte 1 of 1-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(UnkNown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(UnkNown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(UnkNown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(UnkNown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentdispatcher.dispatch(UnkNown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnkNown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(UnkNown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(UnkNown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(UnkNown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(UnkNown Source)
at javax.xml.validation.Validator.validate(UnkNown Source)
at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:164)
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:219)

... 53 more

这是为啥???????

在5-22中部署能成功的xml 在5-13中部署失败。我猜测问题可能出现的原因是:

1,xml解析出错

2.编码问题



-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念