users@grizzly.java.net

Re: GrizzlyWebServerDeployer - Error Could not open ServletContext

From: Survivant 00 <survivant00_at_gmail.com>
Date: Thu, 11 Jun 2009 13:58:16 -0400

can you send us your war file please. I want to test it on the latest
version (not commited yet)

and the command line that you use to launch deployer.

Which verison of Deployer that you use ?


2009/6/11 aloleary <alanoleary_at_gmail.com>

>
> Hello,
> I am trying to use GrizzlyWebServerDeployer programatically in my unit
> tests so that i can test my Jersey/REST code.
>
> I can see it starting ok but it fails to parse internal context paths
> correctly and in turn fails to start
>
> I have the following path structure
>
> ...
> WEB-INF
> \config\applicationContext.xml << spring app context which loads more
> from
> META-INF etc..
> \jsp
> web.xml
> ...
>
> Here is the stack trace...
>
> 18:48:45,543 INFO JerseyServer:55 - Configuring Embedded REST Server
> 11-Jun-2009 18:48:45
> com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer deploy
> INFO: Will deploy application path=xxxxxxxx\src\main\webapp\WEB-INF\web.xml
> 11-Jun-2009 18:48:46
> com.sun.grizzly.http.servlet.deployer.GrizzlyWebServerDeployer deploy
> INFO: deployed application path=xxxxxxxx\src\main\webapp\WEB-INF\web.xml
> 11-Jun-2009 18:48:46 com.sun.grizzly.http.servlet.ServletContextImpl log
> INFO: Initializing Spring root WebApplicationContext
> 18:48:46,425 INFO ContextLoader:189 - Root WebApplicationContext:
> initialization started
> 18:48:46,438 INFO XmlWebApplicationContext:411 - Refreshing
> org.springframework.web.context.support.XmlWebApplicationContext_at_787c16:
> display name [Root WebApplicationContext]; startup date [Thu Jun 11
> 18:48:46
> BST 2009]; root of context hierarchy
> 18:48:46,487 ERROR ContextLoader:215 - Context initialization failed
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> java.io.FileNotFoundException: Could not open ServletContext resource
> [/WEB-INF/applicationContext.xml]
> at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
> at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> at
>
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>
>
> I have no idea why it says the following:
> Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
>
> as the file is specified as the following:
>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/config/application-context.xml</param-value>
> </context-param>
>
> --
> View this message in context:
> http://www.nabble.com/GrizzlyWebServerDeployer---Error-Could-not-open-ServletContext-tp23986126p23986126.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>