Activiti部署流程报错

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ggibenben1314/article/details/46619545

      刚研究工作流运行了一个demo,在部署流程实例的时候报错,如下:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.activiti.engine.ActivitiException: Error parsing XML
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

JBWEB000071: root cause

org.activiti.engine.ActivitiException: Error parsing XML
	org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:236)
	org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:112)
	org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:50)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:103)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
	org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
	org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
	org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
	org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
	org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
	org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:78)
	org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
	com.tgb.itoo.activiti.controller.ActivitiController.deploymentProcessDefinition_zip(ActivitiController.java:99)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:483)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

JBWEB000071: root cause

java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
	org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:262)
	org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:185)
	org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:112)
	org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:50)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:103)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
	org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
	org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
	org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
	org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
	org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
	org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:78)
	org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
	com.tgb.itoo.activiti.controller.ActivitiController.deploymentProcessDefinition_zip(ActivitiController.java:99)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:483)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

JBWEB000071: root cause

org.xml.sax.SAXParseException; systemId: vfs:/D:/jboss-eap-6.2—已配好/standalone/deployments/itoo-activiti-basic-ear.ear/itoo-activiti-basic-web-0.0.1-SNAPSHOT.war/WEB-INF/lib/activiti-bpmn-converter-5.16.jar/org/activiti/impl/bpmn/parser/BPMN20.xsd; lineNumber: 15; columnNumber: 70; src-resolve: Cannot resolve the name 'extension' to a(n) 'element declaration' component.
	org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
	org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown Source)
	org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
	org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
	org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
	org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
	org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
	javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638)
	javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:670)
	__redirected.__SchemaFactory.newSchema(__SchemaFactory.java:179)
	org.activiti.bpmn.converter.BpmnXMLConverter.createSchema(BpmnXMLConverter.java:214)
	org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:193)
	org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:251)
	org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:185)
	org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:112)
	org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:50)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:103)
	org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
	org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
	org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
	org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
	org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
	org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
	org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:78)
	org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
	com.tgb.itoo.activiti.controller.ActivitiController.deploymentProcessDefinition_zip(ActivitiController.java:99)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:483)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)


上网查原因:

第一,你的工作空间使用了汉字;
第二,你的jdk版本可能不支持(如过不是jdk1.7,则可能性较小),
第三,就是项目的缓存。

后两个的可能性已经排除,因为jdk版本是1.8,缓存也刚刚清除过,那就看工作空间是否有汉字,考虑的情况的如下:

1.工作空间不是新建的,用的之前开发的,而且命名都是英文

2.有可能是我导入demo的时候路径中含有中文,所以把路径都改了,结果测试不成功。

3.经过一个晚上的测试都没成功,第二天,又上网查看到如下博文:

      一开始查也看到过类似的博文,可是没和报的错对应上,第二次看到才恍然大悟,和我的错误一样

/D:/jboss-eap-6.2—已配好/standalone/deployments/itoo-activiti-basic-ear.ear/itoo-activiti-basic-web-0.0.1-SNAPSHOT.war/WEB-INF/lib/activiti-bpmn-converter-5.16.jar/org/activiti/impl/bpmn/parser/BPMN20.xsd; lineNumber: 15; columnNumber: 70; src-resolve: Cannot resolve the name 'extension' to a(n) 'element declaration' component.

     因为这个路径中含有中文,所以把文件重命名去掉中文,在eclipse中重新配置jboss,经过测试成功!

没有更多推荐了,返回首页