Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 720

Unexpected servlet config parameter contextConfigLocation=

$
0
0

I am working on an old service that uses servlets in tomcat v7.0.99 with java v11. I have not used servlets in years, so I am unfamiliar with configuration of the servlet container. Tomcat fails to start (running in intellij) because the ApplicationContext object created for our web.xml file contains in its parameters map an entry with key="contextConfigLocation" and value="<NONE>". I know this from inspection via the intellij debugger. This parameter eventually causes the following exception:

Root WebApplicationContext: initialization startedContext initialization failedorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/<NONE>]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/<NONE>]    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) ~[spring-beans-5.3.18.jar:5.3.18]

In our web.xml, we do not set this parameter to any value. We do configure the ContextLoaderListener via the <listener> tag, but we do not specify any parameters via the <context-param> tag.

We have another service that starts successfully. When stopping via debug in a code location in spring just prior to where the exception occurs for the failing service, I do not see that same parameter value in the ApplicationContext for the service that starts successfully. Comparing the web.xml files for the two services, I do not see a difference that would explain the exception.

Does anyone have ideas why/how this unexpected parameter value is being added to the ApplicationContext?


Viewing all articles
Browse latest Browse all 720

Trending Articles