Matt
You are brilliant. I did have multiple versions of spring jars - removed
them and have only spring-2.0.3 version now. I managed to remove those
xerces parser errors I was getting. However, it is unable to find the acegi
providers - is it because they are not on my classpath? I have all the
appfuse-dao and hibernate dependencies in. I really appreciate your help!!
Nested in org.springframework.beans.factory.Bean
CreationException: Error creating bean with name
'authenticationProcessingFilter
' defined in ServletContext resource [/WEB-INF/security.xml]: Cannot resolve
ref
erence to bean 'authenticationManager' while setting bean property
'authenticati
onManager'; nested exception is
org.springframework.beans.factory.BeanCreationEx
ception: Error creating bean with name 'authenticationManager' defined in
Servle
tContext resource [/WEB-INF/security.xml]: Cannot resolve reference to bean
'dao
AuthenticationProvider' while setting bean property 'providers' with key
[0]; ne
sted exception is org.springframework.beans.factory.BeanCreationException:
Error
creating bean with name 'daoAuthenticationProvider' defined in
ServletContext r
esource [/WEB-INF/security.xml]: Cannot resolve reference to bean 'userDao'
whil
e setting bean property 'userDetailsService'; nested exception is
org.springfram
ework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userDao'
is de
fined:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named '
userDao' is defined
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanDefinition(DefaultListableBeanFactory.java:350)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMerg
edBeanDefinition(AbstractBeanFactory.java:920)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:246)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:163)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:271)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1047)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:843)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:254)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:144)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:163)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:271)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveManagedList(BeanDefinitionValueResolver.java:291)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:132)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1047)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:843)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:254)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:144)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:163)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:271)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1047)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:843)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:254)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:144)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:163)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at
org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:352)
at
org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:241)
at
org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.
java:450)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:124)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1136)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
420)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467
)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:156)
at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHan
dlerCollection.java:120)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:156)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
119)
at org.mortbay.jetty.Server.doStart(Server.java:221)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.
java:134)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
jo.java:327)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
java:272)
at
org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
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)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failure
Embedded error: Error creating bean with name
'authenticationProcessingFilter' d
efined in ServletContext resource [/WEB-INF/security.xml]: Cannot resolve
refere
nce to bean 'authenticationManager' while setting bean property
'authenticationM
anager'; nested exception is
org.springframework.beans.factory.BeanCreationExcep
tion: Error creating bean with name 'authenticationManager' defined in
ServletCo
ntext resource [/WEB-INF/security.xml]: Cannot resolve reference to bean
'daoAut
henticationProvider' while setting bean property 'providers' with key [0];
neste
d exception is org.springframework.beans.factory.BeanCreationException:
Error cr
eating bean with name 'daoAuthenticationProvider' defined in ServletContext
reso
urce [/WEB-INF/security.xml]: Cannot resolve reference to bean 'userDao'
while s
etting bean property 'userDetailsService'; nested exception is
org.springframewo
rk.beans.factory.NoSuchBeanDefinitionException: No bean named 'userDao' is
defin
ed
[INFO]
------------------------------------------------------------------------
[INFO] Trace
mraible wrote:
>
> It looks like you have two versions of Spring on your classpath. In
> Tomcat, try cleaning out its "work" directory and see if that solves
> it. If not, look in your deployed WEB-INF/lib and see if there's
> multiple versions of Spring JARs.
>
> Matt
>
> On 5/22/07, nmall <[EMAIL PROTECTED]> wrote:
>>
>> To debug this, I simply compiled the war file and deployed it manually to
>> apache tomcat 6.0. Now I don't get the Xerces parsing errors but I get
>> the
>> following error. Thanks for your help!! The web.xml is same as before.
>>
>> May 22, 2007 1:27:09 AM org.apache.catalina.core.StandardContextValve
>> invoke
>> SEVERE: Exception sending request initialized lifecycle event to listener
>> instance of class
>> org.springframework.web.context.request.RequestContextListener
>> java.lang.NoSuchMethodError:
>> org.springframework.util.ClassUtils.isPresent(Ljava/lang/String;Ljava/lang/ClassLoader;)Z
>> at
>> org.springframework.web.context.request.ServletRequestAttributes.<clinit>(ServletRequestAttributes.java:59)
>> at
>> org.springframework.web.context.request.RequestContextListener.requestInitialized(RequestContextListener.java:64)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
>> at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
>> at java.lang.Thread.run(Thread.java:595)
>> May 22, 2007 1:27:18 AM org.apache.catalina.core.StandardContextValve
>> invoke
>> SEVERE: Exception sending request initialized lifecycle event to listener
>> instance of class
>> org.springframework.web.context.request.RequestContextListener
>> java.lang.NoClassDefFoundError
>> at
>> org.springframework.web.context.request.RequestContextListener.requestInitialized(RequestContextListener.java:64)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
>> at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
>> at java.lang.Thread.run(Thread.java:595)
>> May 22, 2007 1:27:24 AM org.apache.catalina.core.StandardContextValve
>> invoke
>> SEVERE: Exception sending request initialized lifecycle event to listener
>> instance of class
>> org.springframework.web.context.request.RequestContextListener
>> java.lang.NoClassDefFoundError
>> at
>> org.springframework.web.context.request.RequestContextListener.requestInitialized(RequestContextListener.java:64)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
>> at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
>> at java.lang.Thread.run(Thread.java:595)
>>
>>
>>
>>
>> nmall wrote:
>> >
>> > Yes, I do.
>> >
>> >
>> > mraible wrote:
>> >>
>> >> Do you have the following in your web.xml?
>> >>
>> >> <!-- Context Configuration locations for Spring XML files -->
>> >> <context-param>
>> >> <param-name>contextConfigLocation</param-name>
>> >> <param-value>
>> >> classpath*:/applicationContext-resources.xml
>> >> classpath*:/applicationContext-dao.xml
>> >> classpath*:/applicationContext-service.xml
>> >> classpath*:/applicationContext.xml
>> >> /WEB-INF/applicationContext*.xml
>> >> /WEB-INF/security.xml
>> >> </param-value>
>> >> </context-param>
>> >>
>> >> Matt
>> >>
>> >> On 5/21/07, nmall <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>> I am using tomcat 5.5 with JDK 5.0. I use mvn -e tomcat:run-war or
>> mvn
>> >>> -e
>> >>> jetty:run-war to run jetty.
>> >>> My tomcat maven plugin looks like this. Is this right?
>> >>>
>> >>>
>> >>> <plugin>
>> >>> <groupId>org.codehaus.mojo</groupId>
>> >>> <artifactId>tomcat-maven-plugin</artifactId>
>> >>> <version>1.0-SNAPSHOT</version>
>> >>>
>> >>> If I remove the <aop:config> and use a simple spring-2.0-beans.dtd, I
>> >>> get
>> >>> "usermanager" bean not defined errors.
>> >>>
>> >>> Thanks for your help.
>> >>>
>> >>>
>> >>> mraible wrote:
>> >>> >
>> >>> > Are you running this on a server that has an XML parser that
>> doesn't
>> >>> > support XSDs? I suspect your problem is due to a server + JDK
>> >>> > mismatch. I'd recommend trying Tomcat 5.5.x with JDK 5.
>> >>> >
>> >>> > Matt
>> >>> >
>> >>> > On 5/21/07, nmall <[EMAIL PROTECTED]> wrote:
>> >>> >>
>> >>> >> Hi Matt
>> >>> >>
>> >>> >> Thanks for the reply. I am still struggling with the following
>> >>> problem.
>> >>> >> When I inlcude the following header, the xerces parse r throws
>> errors
>> >>> as
>> >>> >> follows. If I simply use spring-beans-2.0.dtd, it doesn't
>> recognize
>> >>> the
>> >>> >> <aop:config> stuff in security.xml. Any help would be appreciated.
>> >>> Why am
>> >>> >> I
>> >>> >> getting this error in this project only.
>> >>> >>
>> >>> >> The header:
>> >>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >>> >> <beans xmlns="http://www.springframework.org/schema/beans"
>> >>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >>> >> xmlns:aop="http://www.springframework.org/schema/aop"
>> >>> >> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> >>> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> >>> >> http://www.springframework.org/schema/aop
>> >>> >> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>> >>> >>
>> >>> >> [ERROR] Exception sending context initialized event to listener
>> >>> instance
>> >>> >> of
>> >>> >> clas
>> >>> >> s org.springframework.web.context.ContextLoaderListener
>> >>> >> org.springframework.beans.factory.BeanDefinitionStoreException:
>> Line
>> >>> 3 in
>> >>> >> XML do
>> >>> >> cument from ServletContext resource [/WEB-INF/security.xml] is
>> >>> invalid;
>> >>> >> nested e
>> >>> >> xception is org.xml.sax.SAXParseException: Document root element
>> >>> "beans",
>> >>> >> must m
>> >>> >> atch DOCTYPE root "null".
>> >>> >> org.xml.sax.SAXParseException: Document root element "beans", must
>> >>> match
>> >>> >> DOCTYPE
>> >>> >> root "null".
>> >>> >> 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.rootElementSpecified(Unkno
>> >>> >> wn Source)
>> >>> >> at
>> >>> >>
>> org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
>> >>> >> Source)
>> >>> >> at
>> >>> >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>> >>> >> Sourc
>> >>> >> e)
>> >>> >> at
>> >>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> >>> >> t(Unknown Source)
>> >>> >> at
>> >>> >>
>> org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
>> >>> >> ootElementHook(Unknown Source)
>> >>> >> at
>> >>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>> >>> >> Dispatcher.dispatch(Unknown Source)
>> >>> >> at
>> >>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>> >>> >> known Source)
>> >>> >> at
>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >>> >> Source)
>> >>> >> at
>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >>> >> Source)
>> >>> >> at org.apache.xerces.parsers.XMLParser.parse(Unknown
>> Source)
>> >>> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown
>> Source)
>> >>> >> at
>> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> >>> >> Source)
>> >>> >> at
>> >>> >>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
>> >>> >> eanDefinitions(XmlBeanDefinitionReader.java:222)
>> >>> >> at
>> >>> >>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> >>> >> nDefinitions(XmlBeanDefinitionReader.java:173)
>> >>> >> at
>> >>> >>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> >>> >> nDefinitions(XmlBeanDefinitionReader.java:148)
>> >>> >> 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:126)
>> >>> >> at
>> >>> >>
>> org.springframework.web.context.support.XmlWebApplicationContext.load
>> >>> >> BeanDefinitions(XmlWebApplicationContext.java:94)
>> >>> >> at
>> >>> >>
>> org.springframework.context.support.AbstractRefreshableApplicationCon
>> >>> >>
>> >>>
>> text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>> >>> >> at
>> >>> >>
>> org.springframework.context.support.AbstractApplicationContext.refres
>> >>> >> h(AbstractApplicationContext.java:269)
>> >>> >> at
>> >>> >>
>> org.springframework.web.context.support.AbstractRefreshableWebApplica
>> >>> >>
>> >>>
>> tionContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> mraible wrote:
>> >>> >> >
>> >>> >> > It seems like you're doing things the hard way - why do you need
>> to
>> >>> >> > initialize your Spring ApplicationContext programmatically? If
>> you
>> >>> >> > load it from the classpath, it won't be an
>> >>> XmlWebApplicationContext,
>> >>> >> > which is what you might be looking for.
>> >>> >> >
>> >>> >> > Matt
>> >>> >> >
>> >>> >> > On 5/21/07, nmall <[EMAIL PROTECTED]> wrote:
>> >>> >> >>
>> >>> >> >> hi,
>> >>> >> >>
>> >>> >> >> My application requires that I initialize the Spring
>> application
>> >>> >> Context
>> >>> >> >> programmatically where I initialize a bunch of other stuff (
>> code
>> >>> >> below)
>> >>> >> >> instead of using ContextLoaderListener in the web.xml
>> >>> >> >> appContext = new ClassPathXmlApplicationContext(
>> >>> >> >> new String[] {"applicationContext.xml"});
>> >>> >> >>
>> >>> >> >> Now, when I add the web filters/struts filters provided by
>> >>> appfuse, I
>> >>> >> get
>> >>> >> >> errors about NOT FINDING the applicationContext. How can I get
>> >>> these
>> >>> >> >> filters
>> >>> >> >> to work. Thanks a lot for your help!!!
>> >>> >> >>
>> >>> >> >> [ERROR] Exception starting filter securityFilter
>> >>> >> >> java.lang.IllegalStateException: No WebApplicationContext
>> found:
>> >>> no
>> >>> >> >> ContextLoade
>> >>> >> >> rListener registered?
>> >>> >> >> at
>> >>> >> >>
>> >>> org.springframework.web.context.support.WebApplicationContextUtils.ge
>> >>> >> >>
>> tRequiredWebApplicationContext(WebApplicationContextUtils.java:84)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.acegisecurity.util.FilterToBeanProxy.getContext(FilterToBeanProxy
>> >>> >> >> .java:177)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.acegisecurity.util.FilterToBeanProxy.doInit(FilterToBeanProxy.jav
>> >>> >> >> a:119)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.acegisecurity.util.FilterToBeanProxy.init(FilterToBeanProxy.java:
>> >>> >> >> 189)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio
>> >>> >> >> nFilterConfig.java:223)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
>> >>> >> >> tionFilterConfig.java:304)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFi
>> >>> >> >> lterConfig.java:77)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.
>> >>> >> >> java:3598)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
>> >>> >> >> 168)
>> >>> >> >> 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)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> >>> >> >> ts(DefaultLifecycleExecutor.java:278)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> >>> >> >> fecycleExecutor.java:143)
>> >>> >> >> at
>> >>> >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>> >>> >> >> at
>> >>> >> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>> >>> >> >> at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>> >>> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >>> Method)
>> >>> >> >> at
>> >>> >> >>
>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> >>> >> >> java:39)
>> >>> >> >> at
>> >>> >> >>
>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> >>> >> >> sorImpl.java:25)
>> >>> >> >> at java.lang.reflect.Method.invoke(Method.java:585)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>> >>> >> >> at
>> >>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>> >>> >> >>
>> >>> >> >> at
>> >>> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> >>> >> >> [ERROR] Exception starting filter gzipFilter
>> >>> >> >> java.lang.ClassNotFoundException:
>> >>> >> >> net.sf.ehcache.constructs.web.filter.GzipFilte
>> >>> >> >> r
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
>> >>> >> >> der.java:1352)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
>> >>> >> >> der.java:1198)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio
>> >>> >> >> nFilterConfig.java:209)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
>> >>> >> >> tionFilterConfig.java:304)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFi
>> >>> >> >> lterConfig.java:77)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.
>> >>> >> >> java:3598)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
>> >>> >> >> 168)
>> >>> >> >> 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)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> >>> >> >> ts(DefaultLifecycleExecutor.java:278)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> >>> >> >> fecycleExecutor.java:143)
>> >>> >> >> at
>> >>> >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>> >>> >> >> at
>> >>> >> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>> >>> >> >> at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>> >>> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >>> Method)
>> >>> >> >> at
>> >>> >> >>
>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> >>> >> >> java:39)
>> >>> >> >> at
>> >>> >> >>
>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> >>> >> >> sorImpl.java:25)
>> >>> >> >> at java.lang.reflect.Method.invoke(Method.java:585)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>> >>> >> >> at
>> >>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>> >>> >> >> at
>> >>> >> >>
>> >>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>> >>> >> >>
>> >>> >> >> --
>> >>> >> >> View this message in context:
>> >>> >> >>
>> >>> >>
>> >>>
>> http://www.nabble.com/Spring-applicationContext-tf3792315s2369.html#a10725328
>> >>> >> >> Sent from the AppFuse - User mailing list archive at
>> Nabble.com.
>> >>> >> >>
>> >>> >> >>
>> >>> ---------------------------------------------------------------------
>> >>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> >> >> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> >>> >> >>
>> >>> >> >>
>> >>> >> >
>> >>> >> >
>> >>> >> > --
>> >>> >> > http://raibledesigns.com
>> >>> >> >
>> >>> >> >
>> >>> ---------------------------------------------------------------------
>> >>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >>
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>>
>> http://www.nabble.com/Spring-applicationContext-tf3792315s2369.html#a10731546
>> >>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>> >>
>> >>> >>
>> ---------------------------------------------------------------------
>> >>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>> >>
>> >>> >>
>> >>> >
>> >>> >
>> >>> > --
>> >>> > http://raibledesigns.com
>> >>> >
>> >>> >
>> ---------------------------------------------------------------------
>> >>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >>> >
>> >>> >
>> >>> >
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/Spring-applicationContext-tf3792315s2369.html#a10731680
>> >>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> http://raibledesigns.com
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Spring-applicationContext-tf3792315s2369.html#a10737890
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Spring-applicationContext-tf3792315s2369.html#a10751842
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]