1. Error description
2015-09-20 22:35:23 [main] WARN Org.springframework.context.support.genericapplicationcontext-exception encountered During context initialization-cancelling Refresh Attemptorg.springframework.beans.factory.CannotLoadBeanClassException:Cannot Find class [ Org.jbpm.pvm.internal.processengine.SpringHelper] for beans with the name ' Springhelper ' defined in class path resource [appli Cationcontext.xml]; Nested exception is Java.lang.ClassNotFoundException:org.jbpm.pvm.internal.processengine.SpringHelperat Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (abstractbeanfactory.java:1325) At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType ( abstractautowirecapablebeanfactory.java:623) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType ( abstractautowirecapablebeanfactory.java:592) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (Abstractbeanfactory.java:1394) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (Abstractbeanfactory.java : 957) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:705) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:757) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:480) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadContext ( abstractgenericcontextloader.java:125) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadContext ( ABSTRACTGENERICCONTEXTLOADER.JAVA:60) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading ( abstractdelegatingsmartcontextloader.java:108) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext ( Abstractdelegatingsmartcontextloader.java:260) at Org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal ( DEFAULTCACHEAWARECONTEXTLOADERDELEGATE.JAVA:63) at Org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext ( defaultcacheawarecontextloaderdelegate.java:83) at Org.springframework.test.context.DefaultTestContext.getApplicationContext (defaulttestcontext.java:74) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies ( dependencyinjectiontestexecutionlistener.java:116) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance ( dependencyinjectiontestexecutionlistener.java:82) at Org.springframework.test.context.TestContextManager.prepareTestInstance (testcontextmanager.java:212) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest (springjunit4classrunner.java:199) at Org.springframework.test.context.junit4.springjunit4classrunner$1.runreflecTivecall (springjunit4classrunner.java:251) at Org.junit.internal.runners.model.ReflectiveCallable.run ( REFLECTIVECALLABLE.JAVA:12) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock ( springjunit4classrunner.java:253) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild ( springjunit4classrunner.java:216) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild ( springjunit4classrunner.java:82) 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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate ( RUNBEFORETESTCLASSCALLBACKS.JAVA:60) at Org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluaTe (runaftertestclasscallbacks.java:67) at Org.junit.runners.ParentRunner.run (parentrunner.java:363) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run (springjunit4classrunner.java:162) 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.jbpm.pvm.internal.processengine.SpringHelperat java.net.urlclassloader$1. Run (urlclassloader.java:366) at Java.net.urlclassloader$1.run (urlclassloader.java:355) at Java.security.AccessController.doPrivileged (Native Method) at Java.net.URLClassLoader.findClass (urlclassloader.java:354) at Java.lang.ClassLoader.loadClass ( classloader.java:425) at Sun.misc.launcher$appclassloader.loadclass (launcher.java:308) at Java.lang.ClassLoader.loadClass (classloader.java:358) at Org.springframework.util.ClassUtils.forName ( classutils.java:246) at Org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass ( abstractbeandefinition.java:395) at Org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass (abstractbeanfactory.java:1346 ) at Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (Abstractbeanfactory.java : 1317) ... More2015-09-20 22:35:23 [main] ERROR Org.springframework.test.context.testcontextmanager-caught exception while Allowing Testexecutionlistener [org.springframewor[email protected]7c520467] to prepare test instance [email protected]]java.lang.illegalstateexception:failed to load Applicationcontextat org.springframework.test. Context. Defaultcacheawarecontextloaderdelegate.loadcontext (defaultcacheawarecontextloaderdelegate.java:91) at Org.springframework.test.context.DefaultTestContext.getApplicationContext (defaulttestcontext.java:74) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies ( dependencyinjectiontestexecutionlistener.java:116) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance ( dependencyinjectiontestexecutionlistener.java:82) at Org.springframework.test.context.TestContextManager.prepareTestInstance (testcontextmanager.java:212) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest (springjunit4classrunner.java:199) at Org.springframework.test.context.junit4.springjunit4classrunner$1.runreflectivecall ( springjunit4classrunner.java:251) at Org.junit.internal.runners.model.ReflectiveCallable.run ( REFLECTIVECALLABLE.JAVA:12) at Org.springframework.test.context.junit4.SpringJUnit4ClassRUnner.methodblock (springjunit4classrunner.java:253) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild (springjunit4classrunner.java:216) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild (springjunit4classrunner.java:82) 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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate ( RUNBEFORETESTCLASSCALLBACKS.JAVA:60) at Org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate ( runaftertestclasscallbacks.java:67) at Org.junit.runners.ParentRunner.run (parentrunner.java:363) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run (Springjunit4classrunner.java:162) 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: Org.springframework.beans.factory.CannotLoadBeanClassException:Cannot Find class [ Org.jbpm.pvm.internal.processengine.SpringHelper] for beans with the name ' Springhelper ' defined in class path resource [appli Cationcontext.xml]; Nested exception is Java.lang.ClassNotFoundException:org.jbpm.pvm.internal.processengine.SpringHelperat Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (abstractbeanfactory.java:1325)At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType ( abstractautowirecapablebeanfactory.java:623) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType ( abstractautowirecapablebeanfactory.java:592) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:1394) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:957) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:705) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:757) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:480) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadContext ( abstractgenericcontextloader.java:125) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadContext ( ABSTRACTGENERICCONTEXTLOADER.JAVA:60) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading ( abstractdelegatingsmartcontextloader.java:108) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext ( abstractdelegatingsmartcontextloader.java:260) at Org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal ( DEFAULTCACHEAWARECONTEXTLOADERDELEGATE.JAVA:63) at Org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext ( defaultcacheawarecontextloaderdelegate.java:83) ... Morecaused By:java.lang.ClassNotFoundException:org.jbpm.pvm.internal.processengine.SpringHelperat Java.net.urlclassloader$1.run (urlclassloader.java:366) at Java.net.urlclassloader$1.run (URLClassLoader.java:355) At java.security.AccessController.doPrivileged (Native Method) at Java.net.URLClassLoader.findClass (URLclassloader.java:354) at Java.lang.ClassLoader.loadClass (classloader.java:425) at sun.misc.launcher$ Appclassloader.loadclass (launcher.java:308) at Java.lang.ClassLoader.loadClass (classloader.java:358) at Org.springframework.util.ClassUtils.forName (classutils.java:246) at Org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass (Abstractbeandefinition.java : 395) at Org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass ( abstractbeanfactory.java:1346) at Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (abstractbeanfactory.java:1317) ... More
2. Cause of Error
Due to the use of org.jbpm.pvm.internal.processengine.SpringHelper in Applicationcontext.xml, but the jbpm jar was not imported, resulting in an error
3. Solutions
Copy the Jbpm.jar to the Web/lib directory and rerun the test use case method
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
caused By:java.lang.ClassNotFoundException:org.jbpm.pvm.internal.processengine.SpringHelper