caused By:java.io.FileNotFoundException:class path resource [Applicationcontext.xml] cannot be ope

Source: Internet
Author: User

1. Error description

java.lang.IllegalStateException:Failed to load Applicationcontextat Org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext ( CACHEAWARECONTEXTLOADERDELEGATE.JAVA:99) at Org.springframework.test.context.DefaultTestContext.getApplicationContext (defaulttestcontext.java:101) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies ( DEPENDENCYINJECTIONTESTEXECUTIONLISTENER.JAVA:109) at Org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance ( DEPENDENCYINJECTIONTESTEXECUTIONLISTENER.JAVA:75) at Org.springframework.test.context.TestContextManager.prepareTestInstance (testcontextmanager.java:331) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest (springjunit4classrunner.java:213) at Org.springframework.test.context.junit4.springjunit4classrunner$1.runreflectivecall ( springjunit4classrunner.java:290) at Org.junit.internal.runners.model.ReflectiveCallable.run (reflectiVECALLABLE.JAVA:12) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock ( springjunit4classrunner.java:292) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild ( springjunit4classrunner.java:233) at Org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild ( springjunit4classrunner.java:87) at Org.junit.runners.parentrunner$3.run (parentrunner.java:238) at Org.junit.runners.parentrunner$1.schedule (parentrunner.java:63) at Org.junit.runners.ParentRunner.runChildren ( parentrunner.java:236) at org.junit.runners.parentrunner.access$000 (parentrunner.java:53) at Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:229) at Org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate ( RUNBEFORETESTCLASSCALLBACKS.JAVA:61) at Org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate ( runaftertestclasscallbacks.java:71) at Org.junit.runners.ParentRunner.run (parentrunner.java:309) at Org.spriNgframework.test.context.junit4.SpringJUnit4ClassRunner.run (springjunit4classrunner.java:176) 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:459) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:675) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:382) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:192) caused by: Org.springframework.beans.factory.BeanDefinitionStoreException:IOException parsing XML document from class path resource [Applicationcontext.xml]; Nested exception is java.io.FileNotFoundException:class path resource [Applicationcontext.xml] cannot be opened because I T does not existat Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeaNdefinitions (xmlbeandefinitionreader.java:343) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 303) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:180) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:216) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:187) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:251) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadBeanDefinitions ( abstractgenericcontextloader.java:253) at Org.springframework.test.context.support.AbstractGenericContextLoader.loadContext ( abstractgenericcontextloader.java:122) at Org.springframework.test.context.support.AbstractGeNericcontextloader.loadcontext (abstractgenericcontextloader.java:60) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading ( ABSTRACTDELEGATINGSMARTCONTEXTLOADER.JAVA:100) at Org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext ( ABSTRACTDELEGATINGSMARTCONTEXTLOADER.JAVA:250) at Org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal ( CACHEAWARECONTEXTLOADERDELEGATE.JAVA:64) at Org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext ( cacheawarecontextloaderdelegate.java:91) ... morecaused by:java.io.FileNotFoundException:class path Resource [Applicationcontext.xml] cannot be opened because it does not existat Org.springframework.core.io.ClassPathResource.getInputStream (classpathresource.java:172) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 329) ... Panax Notoginseng More

2. Cause of error


3. Solutions

caused By:java.io.FileNotFoundException:class path resource [Applicationcontext.xml] cannot be ope

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.