java.lang.NoClassDefFoundError: org/activiti/validation/ProcessValidator
2016-07-05 13:52
441 查看
1、错误描述
2、错误原因
由错误提示可知,是缺少有关的Activiti的jar包,并且是和validation有关
3、解决办法
(1)将activiti-process-validation-5.21.0.jar复制到lib目录下
(2)在pom.xml中添加
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in class path resource [activiti.cfg.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/activiti/validation/ProcessValidator at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfiguration(BeansConfigurationHelper.java:36) at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfigurationFromResource(BeansConfigurationHelper.java:48) at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(ProcessEngineConfiguration.java:232) at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(ProcessEngineConfiguration.java:228) at org.activiti.engine.impl.test.TestHelper.getProcessEngine(TestHelper.java:227) at org.activiti.engine.test.ActivitiRule.initializeProcessEngine(ActivitiRule.java:237) at org.activiti.engine.test.ActivitiRule.starting(ActivitiRule.java:205) at org.activiti.engine.test.ActivitiRule.startingQuietly(ActivitiRule.java:171) at org.activiti.engine.test.ActivitiRule.access$000(ActivitiRule.java:86) at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:124) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.NoClassDefFoundError: org/activiti/validation/ProcessValidator at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class.privateGetPublicMethods(Class.java:2814) at java.lang.Class.privateGetPublicMethods(Class.java:2830) at java.lang.Class.privateGetPublicMethods(Class.java:2830) at java.lang.Class.getMethods(Class.java:1602) at org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:54) at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:46) at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:270) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:189) at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:172) at org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:225) at org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:63) at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:725) at org.springframework.beans.AbstractNestablePropertyAccessor.isWritableProperty(AbstractNestablePropertyAccessor.java:557) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1483) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ... 31 more java.lang.NullPointerException at org.activiti.designer.test.ProcessTestAudition.startProcess(ProcessTestAudition.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:126) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) org.activiti.engine.ActivitiException: Programmatic error: could not instantiate org.activiti.designer.test.ProcessTestAudition at org.activiti.engine.test.ActivitiRule.finished(ActivitiRule.java:268) at org.activiti.engine.test.ActivitiRule.finishedQuietly(ActivitiRule.java:179) at org.activiti.engine.test.ActivitiRule.access$400(ActivitiRule.java:86) at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:135) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.ClassNotFoundException: org/activiti/designer/test/ProcessTestAudition at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:259) at org.activiti.engine.test.ActivitiRule.finished(ActivitiRule.java:265) ... 19 more
2、错误原因
由错误提示可知,是缺少有关的Activiti的jar包,并且是和validation有关
3、解决办法
(1)将activiti-process-validation-5.21.0.jar复制到lib目录下
(2)在pom.xml中添加
<dependency> <groupId>org.activiti</groupId> <artifactId>activiti-process-validation</artifactId> <version>5.21.0</version> </dependency>
相关文章推荐
- spring四种依赖注入方式
- mybatis与spring3.1整合
- Spring AOP详解 (转) 以及IOC(个人理解)
- java.lang.SecurityException: class "javax.servlet.FilterRegistration"(spark下maven)
- Unable to load configuration. - action 解决方案(struts 2 学习笔记)
- java注释规范
- Eclipse-----Debug Maven依赖Jar包找不到源码
- java.lang.NoClassDefFoundError: org/activiti/image/ProcessDiagramGenerator
- idea maven package java.lang.OutOfMemoryError 问题解决
- java设计模式(2)策略模式
- list与array转换
- 卸载JAVA(TM)SE Development Kit 6 Updata 45(64bit)时出错
- Java虚拟机第一章java体系结构
- Java多线程基础-1-基本慨念
- springmvc后台获取图片,到jsp页面显示
- spring4+mybatis3无法读取properties解决办法
- JavaEE学习笔记之SSH—Hibernate(3)
- java 反射提供的功能(1)
- 【加密技术】Java实现四大加密算法
- eclipse构建maven scala 项目 编译成功