Announcement Announcement Module
Collapse
No announcement yet.
Could not find applicationContext in overlayed war Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Could not find applicationContext in overlayed war

    Hi guys,
    I have a peculiar problem here. I use spring for a webproject and it works perfect. My web.xml file has the following context parameter:
    Code:
    <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                classpath:/contexts/applicationContext-war1.xml
                classpath:/contexts/applicationContext-persistance.xml
                classpath:/contexts/applicationContext-security.xml
                /WEB-INF/applicationContext*.xml
                classpath*:/applicationContext.xml
            </param-value>
        </context-param>
    Again, this work perfectly. The contexts are placed in /src/main/resources/contexts/.

    I then started another project, and i use Maven's war plugin to overlay the old one with a new one, wich has this context param:
    Code:
    <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                classpath:/contexts/applicationContext-war2.xml
                classpath:/contexts/applicationContext-war1.xml
                classpath:/contexts/applicationContext-persistance.xml
                classpath:/contexts/applicationContext-security.xml
                /WEB-INF/applicationContext*.xml
                classpath*:/applicationContext.xml
            </param-value>
        </context-param>
    So, I want to use the application context from the old war and just add a new one. The overlay works fine, every file is where it's supposed to be, but at startup i get an error, that the /contexts/applicationContext-security.xml context could not be loaded because it does not exist.

    Am I being dumb here? but shouldn't the classpath of the overlay war be the the same as the classpath of the first war?
Working...
X