I fixed this by adding ContextLoaderListener to the web.xml. However, I am
getting the following error in my bean definition in
applicaitonContext-struts.xml. "Scope" is available in my bean as follows
<bean id="userAction" class="org.appfuse.webapp.action.UserAction"
scope="prototype">
<property name="userManager" ref="userManager"/>
<property name="roleManager" ref="roleManager"/>
<property name="mailEngine" ref="mailEngine"/>
<property name="mailMessage" ref="mailMessage"/>
<property name="templateName" value="accountCreated.vm"/>
</bean>
I have this as my header:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
Thanks so much for any suggestions!
[ERROR] Exception sending context initialized event to listener instance of
clas
s org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Line 16 in
XML d
ocument from ServletContext resource
[/WEB-INF/applicationContext-struts.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: Attribute
"scope" m
ust be declared for element type "bean".
org.xml.sax.SAXParseException: Attribute "scope" must be declared for
element ty
pe "bean".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValid
ate(Unknown Source)
nmall wrote:
>
> Hi,
>
> I have my applicationContext.xml in src/main/resources. Where does the
> Spring application context get loaded in appfuse. However I am getting the
> following error. Thanks for your help!
>
> [ERROR] Exception sending context initialized event to listener instance
> of clas
> s org.appfuse.webapp.listener.StartupListener
> java.lang.IllegalStateException: No WebApplicationContext found: no
> ContextLoade
> rListener registered?
> at
> org.springframework.web.context.support.WebApplicationContextUtils.ge
> tRequiredWebApplicationContext(WebApplicationContextUtils.java:84)
> at
> org.appfuse.webapp.listener.StartupListener.contextInitialized(Sta
> rtupListener.java:52)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:3727)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 162)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
> )
> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> at
> org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMo
> jo.java:253)
> at
> org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java
> :113)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:493)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:463)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
>
--
View this message in context:
http://www.nabble.com/No-WebApplicationContext-found-tf3791115s2369.html#a10721989
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]