I have a war file which is a web application built on spring and jsf. I have one more jar file in the web-inf/lib folder of this web app.
This jar again is based only on Spring framework.
Now when I access any of the class files of the above jar which is in web-inf lib I get the error as "org.springframework.beans.factory.BeanDefinitionStoreException: Line 4 in XML document from class path resource [ApplicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null"."
The war has its own contxt file which is named different from the contect file in the jar.
I have no clue why it complaints of the context file of not being proper when it tries to access the class files of the jar which is spring based.
When I run the same stuff using the Junittest cases it runs fine for the jar file.
Also I have tested the same stuff on Spring test i.e AbstractDependencyInjectionSpringContextTests and it works just fine.
So there actually cannot be any issue of the context file that its complaining of.
Can anyone please suggest why could I be facing this error ?
Here are the contents of the context files
---------- JAR CONTEXT FILE --------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">