gudii9
asked on
spring maven example
Hi,
I am running simple spring hello world application wiht maven integration. I am getting following error
log4j:WARN No appenders could be found for logger (com.gp.MessageRunner).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.springframework.beans. factory.Be anDefiniti onStoreExc eption: IOException parsing XML document from class path resource [application-context.xml]; nested exception is java.io.FileNotFoundExcept ion: class path resource [application-context.xml] cannot be opened because it does not exist
at org.springframework.beans. factory.xm l.XmlBeanD efinitionR eader.load BeanDefini tions(XmlB eanDefinit ionReader. java:349)
at org.springframework.beans. factory.xm l.XmlBeanD efinitionR eader.load BeanDefini tions(XmlB eanDefinit ionReader. java:310)
at org.springframework.beans. factory.su pport.Abst ractBeanDe finitionRe ader.loadB eanDefinit ions(Abstr actBeanDef initionRea der.java:1 43)
at org.springframework.beans. factory.su pport.Abst ractBeanDe finitionRe ader.loadB eanDefinit ions(Abstr actBeanDef initionRea der.java:1 78)
at org.springframework.beans. factory.su pport.Abst ractBeanDe finitionRe ader.loadB eanDefinit ions(Abstr actBeanDef initionRea der.java:1 49)
at org.springframework.beans. factory.su pport.Abst ractBeanDe finitionRe ader.loadB eanDefinit ions(Abstr actBeanDef initionRea der.java:2 12)
at org.springframework.contex t.support. AbstractXm lApplicati onContext. loadBeanDe finitions( AbstractXm lApplicati onContext. java:113)
at org.springframework.contex t.support. AbstractXm lApplicati onContext. loadBeanDe finitions( AbstractXm lApplicati onContext. java:80)
at org.springframework.contex t.support. AbstractRe freshableA pplication Context.re freshBeanF actory(Abs tractRefre shableAppl icationCon text.java: 123)
at org.springframework.contex t.support. AbstractAp plicationC ontext.obt ainFreshBe anFactory( AbstractAp plicationC ontext.jav a:423)
at org.springframework.contex t.support. AbstractAp plicationC ontext.ref resh(Abstr actApplica tionContex t.java:353 )
at org.springframework.contex t.support. ClassPathX mlApplicat ionContext .<init>(Cl assPathXml Applicatio nContext.j ava:139)
at org.springframework.contex t.support. ClassPathX mlApplicat ionContext .<init>(Cl assPathXml Applicatio nContext.j ava:83)
at com.gp.MessageRunner.main( MessageRun ner.java:2 4)
Caused by: java.io.FileNotFoundExcept ion: class path resource [application-context.xml] cannot be opened because it does not exist
at org.springframework.core.i o.ClassPat hResource. getInputSt ream(Class PathResour ce.java:14 2)
at org.springframework.beans. factory.xm l.XmlBeanD efinitionR eader.load BeanDefini tions(XmlB eanDefinit ionReader. java:336)
... 13 more
I do have the application.xml in src/test/resource. Any ideas, sample code, links, resources highly appreciated. thanks in advance
I am running simple spring hello world application wiht maven integration. I am getting following error
log4j:WARN No appenders could be found for logger (com.gp.MessageRunner).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at com.gp.MessageRunner.main(
Caused by: java.io.FileNotFoundExcept
at org.springframework.core.i
at org.springframework.beans.
... 13 more
I do have the application.xml in src/test/resource. Any ideas, sample code, links, resources highly appreciated. thanks in advance
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>>I do have the application-context.xml in src/test/resource