Hi,
I'm trying to change the location of the applicationContext.xml file, or even the name of it, and pointing to it from the web.xml using contextConfigLocation, but I keep getting the same error: It first tries to read beans for the web application from the file I point to (/WEB-INF/context/applicationContext.xml) and then for each portlet it tries to read from the portlet's own context (eg /WEB-INF/basic-portlet.xml) and also the default location (/WEB-INF/applicationContext.xml)... which it obviously can't find as it's not there... which gives me a FileNotFoundException and portlet death... what I can't figure out is why it's looking there when it has clearly read the web.xml that points to a different location... thoughts?
Logs:
<more logs available if needed>Code:[#|2009-01-29T17:49:35.950+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Timer-9;|PWC1412: WebModule[/WebServer] ServletContext.log():Initializing Spring root WebApplicationContext|#] [#|2009-01-29T17:49:35.950+0000|INFO|sun-appserver9.1|org.springframework.web.context.ContextLoader|_ThreadID=18;_ThreadName=Timer-9;|Root WebApplicationContext: initialization started|#] [#|2009-01-29T17:49:35.981+0000|INFO|sun-appserver9.1|org.springframework.web.context.support.XmlWebApplicationContext|_ThreadID=18;_ThreadName=Timer-9;|Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1506d68: display name [Root WebApplicationContext]; startup date [Thu Jan 29 17:49:35 GMT 2009]; root of context hierarchy|#] [#|2009-01-29T17:49:36.044+0000|INFO|sun-appserver9.1|org.springframework.beans.factory.xml.XmlBeanDefinitionReader|_ThreadID=18;_ThreadName=Timer-9;|Loading XML bean definitions from ServletContext resource [/WEB-INF/context/applicationContext.xml]|#] [#|2009-01-29T17:49:36.356+0000|INFO|sun-appserver9.1|org.springframework.web.context.support.XmlWebApplicationContext|_ThreadID=18;_ThreadName=Timer-9;|Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1506d68]: org.springframework.beans.factory.support.DefaultListableBeanFactory@197e73f|#] [#|2009-01-29T17:49:36.747+0000|INFO|sun-appserver9.1|org.springframework.beans.factory.support.DefaultListableBeanFactory|_ThreadID=18;_ThreadName=Timer-9;|Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@197e73f: defining beans [viewResolver]; root of factory hierarchy|#] [#|2009-01-29T17:49:36.794+0000|INFO|sun-appserver9.1|org.springframework.web.context.ContextLoader|_ThreadID=18;_ThreadName=Timer-9;|Root WebApplicationContext: initialization completed in 844 ms|#] [#|2009-01-29T17:49:36.794+0000|INFO|sun-appserver9.1|debug.com.sun.portal.portletcontainer.appengine.impl|_ThreadID=18;_ThreadName=Timer-9;WebServer;|PSPL_PAECSPPAI0015 : Loading DD for the portlet application : WebServer|#] [#|2009-01-29T17:49:36.794+0000|INFO|sun-appserver9.1|debug.com.sun.portal.portletcontainer.appengine.impl|_ThreadID=18;_ThreadName=Timer-9;Basic;|PSPL_PAECSPPAI0012 : Portlet Initialized: Basic|#] [#|2009-01-29T17:49:36.981+0000|INFO|sun-appserver9.1|org.springframework.web.portlet.DispatcherPortlet|_ThreadID=18;_ThreadName=Timer-9;|Initializing portlet 'Spring'|#] [#|2009-01-29T17:49:36.981+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Timer-9;|PWC1412: WebModule[/WebServer] ServletContext.log():Initializing Spring FrameworkPortlet 'Spring'|#] [#|2009-01-29T17:49:36.981+0000|INFO|sun-appserver9.1|debug.com.sun.portal.portletcontainer.WebServer|_ThreadID=18;_ThreadName=Timer-9;|Initializing Spring FrameworkPortlet 'Spring'|#] [#|2009-01-29T17:49:36.997+0000|INFO|sun-appserver9.1|org.springframework.web.portlet.DispatcherPortlet|_ThreadID=18;_ThreadName=Timer-9;|FrameworkPortlet 'Spring': initialization started|#] [#|2009-01-29T17:49:36.997+0000|INFO|sun-appserver9.1|org.springframework.web.portlet.context.XmlPortletApplicationContext|_ThreadID=18;_ThreadName=Timer-9;|Refreshing org.springframework.web.portlet.context.XmlPortletApplicationContext@962202: display name [PortletApplicationContext for namespace 'Spring-portlet']; startup date [Thu Jan 29 17:49:36 GMT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@1506d68|#] [#|2009-01-29T17:49:36.997+0000|INFO|sun-appserver9.1|org.springframework.beans.factory.xml.XmlBeanDefinitionReader|_ThreadID=18;_ThreadName=Timer-9;|Loading XML bean definitions from PortletContext resource [/WEB-INF/Spring-portlet.xml]|#] [#|2009-01-29T17:49:37.013+0000|INFO|sun-appserver9.1|org.springframework.beans.factory.xml.XmlBeanDefinitionReader|_ThreadID=18;_ThreadName=Timer-9;|Loading XML bean definitions from PortletContext resource [/WEB-INF/applicationContext.xml]|#] [#|2009-01-29T17:49:37.013+0000|SEVERE|sun-appserver9.1|org.springframework.web.portlet.DispatcherPortlet|_ThreadID=18;_ThreadName=Timer-9;_RequestID=ef413f5d-8576-4139-b75d-870f600d4ab6;|Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from PortletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open PortletContext resource [/WEB-INF/applicationContext.xml] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:284) 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.web.portlet.context.XmlPortletApplicationContext.loadBeanDefinitions(XmlPortletApplicationContext.java:124) at org.springframework.web.portlet.context.XmlPortletApplicationContext.loadBeanDefinitions(XmlPortletApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:125) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:420) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:350) at org.springframework.web.portlet.FrameworkPortlet.createPortletApplicationContext(FrameworkPortlet.java:347) at org.springframework.web.portlet.FrameworkPortlet.initPortletApplicationContext(FrameworkPortlet.java:292) at org.springframework.web.portlet.FrameworkPortlet.initPortletBean(FrameworkPortlet.java:265) at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:116) at javax.portlet.GenericPortlet.init(GenericPortlet.java:107) at com.sun.portal.portletcontainer.appengine.impl.LifecycleManagerImpl.createPortlets(LifecycleManagerImpl.java:353) at com.sun.portal.portletcontainer.appengine.impl.LifecycleManagerImpl.<init>(LifecycleManagerImpl.java:137) ...


Reply With Quote