Log4j:warn No Appenders could is found for logger ( Org.springframework.core.io.support.PathMatchingResourcePatternResolver).
Log4j:warn Initialize the log4j system properly.
Java.lang.ExceptionInInitializerError
At Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
At Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:62)
At Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:45)
At Java.lang.reflect.Constructor.newInstance (constructor.java:423)
At Org.junit.runners.BlockJUnit4ClassRunner.createTest (blockjunit4classrunner.java:202)
At Org.junit.runners.blockjunit4classrunner$1.runreflectivecall (blockjunit4classrunner.java:251)
At Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15)
At Org.junit.runners.BlockJUnit4ClassRunner.methodBlock (blockjunit4classrunner.java:248)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:76)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:50)
At Org.junit.runners.parentrunner$3.run (parentrunner.java:193)
At Org.junit.runners.parentrunner$1.schedule (parentrunner.java:52)
At Org.junit.runners.ParentRunner.runChildren (parentrunner.java:191)
At org.junit.runners.parentrunner.access$000 (parentrunner.java:42)
At Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:184)
At Org.junit.runners.ParentRunner.run (parentrunner.java:236)
At Org.junit.runner.JUnitCore.run (junitcore.java:157)
At Com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs (junit4ideatestrunner.java:117)
At Com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs (junit4ideatestrunner.java:42)
At Com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart (junitstarter.java:262)
At Com.intellij.rt.execution.junit.JUnitStarter.main (junitstarter.java:84)
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:498)
At Com.intellij.rt.execution.application.AppMain.main (appmain.java:147)
caused By:org.springframework.beans.factory.BeanDefinitionStoreException:IOException parsing XML document from class Path resource [spring/applicationcontext.xml]; Nested exception is java.io.FileNotFoundException:class path resource [Spring/applicationcontext.xml] cannot be opened b Ecause it does not exist
At Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:341)
At Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:302)
At Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:143)
At Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:178)
At Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:149)
At Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:212)
At Org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions ( abstractxmlapplicationcontext.java:126)
At Org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions ( abstractxmlapplicationcontext.java:92)
At Org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory ( abstractrefreshableapplicationcontext.java:130)
At Org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory ( abstractapplicationcontext.java:465)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:395)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( classpathxmlapplicationcontext.java:139)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( CLASSPATHXMLAPPLICATIONCONTEXT.JAVA:83)
At S2sh.test.springutils.<clinit> (springutils.java:9)
... More
caused By:java.io.FileNotFoundException:class path resource [Spring/applicationcontext.xml] cannot be opened because it does not exist
At Org.springframework.core.io.ClassPathResource.getInputStream (classpathresource.java:141)
At Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:328)
... More
Solve:
1. This is because idea doesn't think your Config folder is source folders, you just need to manually correct it
1. Right-click on the project to find the following open Modules Setting, opened, then needless to say.
IntelliJ idea appears class path resource [Spring/applicationcontext.xml] cannot be opened because it does not exist