You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by laurosn <la...@gmail.com> on 2007/05/21 20:59:31 UTC

[S2] Deploy error

Hi all,

i'm developing an application using Struts 2 + Spring + Hibernate + Tiles 2.
I'm using the Jdeveloper 10.1.3 as the IDE. When i run the app inside the
IDE, everything works fine. But when i generate an EAR file and try to
deploy to server (OC4J or Tomcat), i receive the following message:

INFO - ContextLoader.initWebApplicationContext(174) | Root
WebApplicationContext
: initialization started
ERROR - ContextLoader.initWebApplicationContext(205) | Context
initialization fa
iled
java.lang.IllegalArgumentException: Name must not be null
        at org.springframework.util.Assert.notNull(Assert.java:113)
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:162)
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:147)
        at
org.springframework.web.context.ContextLoader.determineContextClass(C
ontextLoader.java:273)
        at
org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:230)
        at
org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
        at
org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3827)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
334)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:791)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77


I also tried to put this in my web.xml (But here's another doubt: Why i have
to do this in web.xml for deploy and for running standalone not):

<context-param>
        <param-name>contextClass</param-name>
       
<param-value>org.springframework.web.context.support.XmlWebApplicationContext</param-value>
 </context-param>

Then the stacktrace changes:

INFO - ContextLoader.initWebApplicationContext(174) | Root
WebApplicationContext
: initialization started
ERROR - ContextLoader.initWebApplicationContext(205) | Context
initialization fa
iled
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
pars
ing XML document from ServletContext resource []; nested exception is
java.io.Fi
leNotFoundException: Could not open ServletContext resource []
Caused by:
java.io.FileNotFoundException: Could not open ServletContext resource []
        at
org.springframework.web.context.support.ServletContextResource.getInp
utStream(ServletContextResource.java:99)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:351)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:334)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
        at
org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:123)
        at
org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:91)
        at
org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
        at
org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:294)
        at
org.springframework.web.context.support.AbstractRefreshableWebApplica
tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at
org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:246)
        at
org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
        at
org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3827)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
334)

Anyone has a tip or suggestion of what is happening? The strange is that
application runs fine inside the ide.
Thanks in advance.

Lauro

-- 
View this message in context: http://www.nabble.com/-S2--Deploy-error-tf3792174.html#a10724834
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Deploy error

Posted by laurosn <la...@gmail.com>.
Yeah, i'm sure.

It's very strange. I already opened the EAR file a thousand times to see if
antything could be wrong.
I have done this procedure (create EAR file) many times for other app. But
for Struts 2 + Spring is the first one.
My guess is that the Jdeveloper sets a lot o of environments variables to
find all the  files and run/debug the app.

Anyway, thanks for your response.

Lauro  


nuwan chandrasoma-2 wrote:
> 
> hi,
> 
> are you sure you have the applicationContext.xml file inside the WEB-INF 
> directory of the .ear file?
> 
> http://www.springframework.org/docs/api/org/springframework/web/context/support/XmlWebApplicationContext.html
> 
> hope this would help you.
> 
> Thanks,
> 
> Nuwan
> 
> 
> 
> ----- Original Message ----- 
> From: "laurosn" <la...@gmail.com>
> To: <us...@struts.apache.org>
> Sent: Monday, May 21, 2007 6:59 PM
> Subject: [S2] Deploy error
> 
> 
>>
>> Hi all,
>>
>> i'm developing an application using Struts 2 + Spring + Hibernate + Tiles 
>> 2.
>> I'm using the Jdeveloper 10.1.3 as the IDE. When i run the app inside the
>> IDE, everything works fine. But when i generate an EAR file and try to
>> deploy to server (OC4J or Tomcat), i receive the following message:
>>
>> INFO - ContextLoader.initWebApplicationContext(174) | Root
>> WebApplicationContext
>> : initialization started
>> ERROR - ContextLoader.initWebApplicationContext(205) | Context
>> initialization fa
>> iled
>> java.lang.IllegalArgumentException: Name must not be null
>>        at org.springframework.util.Assert.notNull(Assert.java:113)
>>        at
>> org.springframework.util.ClassUtils.forName(ClassUtils.java:162)
>>        at
>> org.springframework.util.ClassUtils.forName(ClassUtils.java:147)
>>        at
>> org.springframework.web.context.ContextLoader.determineContextClass(C
>> ontextLoader.java:273)
>>        at
>> org.springframework.web.context.ContextLoader.createWebApplicationCon
>> text(ContextLoader.java:230)
>>        at
>> org.springframework.web.context.ContextLoader.initWebApplicationConte
>> xt(ContextLoader.java:184)
>>        at
>> org.springframework.web.context.ContextLoaderListener.contextInitiali
>> zed(ContextLoaderListener.java:49)
>>        at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContex
>> t.java:3827)
>>        at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
>> 334)
>>        at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
>> .java:791)
>>        at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
>>
>>
>> I also tried to put this in my web.xml (But here's another doubt: Why i 
>> have
>> to do this in web.xml for deploy and for running standalone not):
>>
>> <context-param>
>>        <param-name>contextClass</param-name>
>>
>> <param-value>org.springframework.web.context.support.XmlWebApplicationContext</param-value>
>> </context-param>
>>
>> Then the stacktrace changes:
>>
>> INFO - ContextLoader.initWebApplicationContext(174) | Root
>> WebApplicationContext
>> : initialization started
>> ERROR - ContextLoader.initWebApplicationContext(205) | Context
>> initialization fa
>> iled
>> org.springframework.beans.factory.BeanDefinitionStoreException: 
>> IOException
>> pars
>> ing XML document from ServletContext resource []; nested exception is
>> java.io.Fi
>> leNotFoundException: Could not open ServletContext resource []
>> Caused by:
>> java.io.FileNotFoundException: Could not open ServletContext resource []
>>        at
>> org.springframework.web.context.support.ServletContextResource.getInp
>> utStream(ServletContextResource.java:99)
>>        at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:351)
>>        at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:334)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
>>        at
>> org.springframework.web.context.support.XmlWebApplicationContext.load
>> BeanDefinitions(XmlWebApplicationContext.java:123)
>>        at
>> org.springframework.web.context.support.XmlWebApplicationContext.load
>> BeanDefinitions(XmlWebApplicationContext.java:91)
>>        at
>> org.springframework.context.support.AbstractRefreshableApplicationCon
>> text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.refres
>> h(AbstractApplicationContext.java:294)
>>        at
>> org.springframework.web.context.support.AbstractRefreshableWebApplica
>> tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
>>        at
>> org.springframework.web.context.ContextLoader.createWebApplicationCon
>> text(ContextLoader.java:246)
>>        at
>> org.springframework.web.context.ContextLoader.initWebApplicationConte
>> xt(ContextLoader.java:184)
>>        at
>> org.springframework.web.context.ContextLoaderListener.contextInitiali
>> zed(ContextLoaderListener.java:49)
>>        at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContex
>> t.java:3827)
>>        at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
>> 334)
>>
>> Anyone has a tip or suggestion of what is happening? The strange is that
>> application runs fine inside the ide.
>> Thanks in advance.
>>
>> Lauro
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/-S2--Deploy-error-tf3792174.html#a10724834
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Deploy-error-tf3792174.html#a10736592
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[OT]Re: [S2] Deploy error

Posted by Nuwan Chandrasoma <my...@gmail.com>.
hi,

are you sure you have the applicationContext.xml file inside the WEB-INF 
directory of the .ear file?

http://www.springframework.org/docs/api/org/springframework/web/context/support/XmlWebApplicationContext.html

hope this would help you.

Thanks,

Nuwan



----- Original Message ----- 
From: "laurosn" <la...@gmail.com>
To: <us...@struts.apache.org>
Sent: Monday, May 21, 2007 6:59 PM
Subject: [S2] Deploy error


>
> Hi all,
>
> i'm developing an application using Struts 2 + Spring + Hibernate + Tiles 
> 2.
> I'm using the Jdeveloper 10.1.3 as the IDE. When i run the app inside the
> IDE, everything works fine. But when i generate an EAR file and try to
> deploy to server (OC4J or Tomcat), i receive the following message:
>
> INFO - ContextLoader.initWebApplicationContext(174) | Root
> WebApplicationContext
> : initialization started
> ERROR - ContextLoader.initWebApplicationContext(205) | Context
> initialization fa
> iled
> java.lang.IllegalArgumentException: Name must not be null
>        at org.springframework.util.Assert.notNull(Assert.java:113)
>        at org.springframework.util.ClassUtils.forName(ClassUtils.java:162)
>        at org.springframework.util.ClassUtils.forName(ClassUtils.java:147)
>        at
> org.springframework.web.context.ContextLoader.determineContextClass(C
> ontextLoader.java:273)
>        at
> org.springframework.web.context.ContextLoader.createWebApplicationCon
> text(ContextLoader.java:230)
>        at
> org.springframework.web.context.ContextLoader.initWebApplicationConte
> xt(ContextLoader.java:184)
>        at
> org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:49)
>        at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:3827)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 334)
>        at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:791)
>        at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
>
>
> I also tried to put this in my web.xml (But here's another doubt: Why i 
> have
> to do this in web.xml for deploy and for running standalone not):
>
> <context-param>
>        <param-name>contextClass</param-name>
>
> <param-value>org.springframework.web.context.support.XmlWebApplicationContext</param-value>
> </context-param>
>
> Then the stacktrace changes:
>
> INFO - ContextLoader.initWebApplicationContext(174) | Root
> WebApplicationContext
> : initialization started
> ERROR - ContextLoader.initWebApplicationContext(205) | Context
> initialization fa
> iled
> org.springframework.beans.factory.BeanDefinitionStoreException: 
> IOException
> pars
> ing XML document from ServletContext resource []; nested exception is
> java.io.Fi
> leNotFoundException: Could not open ServletContext resource []
> Caused by:
> java.io.FileNotFoundException: Could not open ServletContext resource []
>        at
> org.springframework.web.context.support.ServletContextResource.getInp
> utStream(ServletContextResource.java:99)
>        at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
> nDefinitions(XmlBeanDefinitionReader.java:351)
>        at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
> nDefinitions(XmlBeanDefinitionReader.java:334)
>        at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
>        at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
>        at
> org.springframework.web.context.support.XmlWebApplicationContext.load
> BeanDefinitions(XmlWebApplicationContext.java:123)
>        at
> org.springframework.web.context.support.XmlWebApplicationContext.load
> BeanDefinitions(XmlWebApplicationContext.java:91)
>        at
> org.springframework.context.support.AbstractRefreshableApplicationCon
> text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
>        at
> org.springframework.context.support.AbstractApplicationContext.refres
> h(AbstractApplicationContext.java:294)
>        at
> org.springframework.web.context.support.AbstractRefreshableWebApplica
> tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
>        at
> org.springframework.web.context.ContextLoader.createWebApplicationCon
> text(ContextLoader.java:246)
>        at
> org.springframework.web.context.ContextLoader.initWebApplicationConte
> xt(ContextLoader.java:184)
>        at
> org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:49)
>        at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:3827)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 334)
>
> Anyone has a tip or suggestion of what is happening? The strange is that
> application runs fine inside the ide.
> Thanks in advance.
>
> Lauro
>
> -- 
> View this message in context: 
> http://www.nabble.com/-S2--Deploy-error-tf3792174.html#a10724834
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org