struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Problem with Spring plugin
Date Fri, 01 May 2009 12:33:31 GMT
Are you sure that's the right jar? I could be wrong, but version
number makes me think that you could be grabbing the OSGI-ified spring
jar.

-Wes

On Fri, May 1, 2009 at 1:21 AM,  <yarongolan@msn.com> wrote:
> Hi,
>
> I'm having some problems using Struts2 and the Spring plugin using Tomcat.
> I'm using Struts 2.1.6 (and its appropriate plugin) and Spring Framework
> 2.5.6.SEC1 (spring.jar).
> When I try to add the listener to web.xml like so:
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener
>        </listener-class>
> </listener>
>
> I get the following exception:
>
> SEVERE: Exception starting filter struts2
> java.lang.RuntimeException: java.lang.RuntimeException:
> com.opensymphony.xwork2.inject.DependencyException: Could not find a
> suitable constructor in org.apache.struts2.spring.StrutsSpringObjectFactory.
>        at
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.ja
> va:132)
>        at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:
> 507)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:
> 517)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:548)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.jav
> a:574)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:
> 546)
>        at
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(Def
> aultConfiguration.java:182)
>        at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Configu
> rationManager.java:55)
>        at
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatche
> r.java:360)
>        at
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
>        at
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:19
> 0)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
> Config.java:275)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
> terConfig.java:397)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
> fig.java:108)
>        at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:37
> 09)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>        at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>        at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>        at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>        at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.lang.RuntimeException:
> com.opensymphony.xwork2.inject.DependencyException: Could not find a
> suitable constructor in org.apache.struts2.spring.StrutsSpringObjectFactory.
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.jav
> a:581)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
>        at
> com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory
> .java:32)
>        at
> com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.ja
> va:130)
>        ... 29 more
> Caused by: com.opensymphony.xwork2.inject.DependencyException: Could not
> find a suitable constructor in
> org.apache.struts2.spring.StrutsSpringObjectFactory.
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.findConstru
> ctorIn(ContainerImpl.java:386)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(Cont
> ainerImpl.java:319)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:305
> )
>        at
> com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:304
> )
>        at
> com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(Refer
> enceCache.java:150)
>        at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at
> com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceC
> ache.java:76)
>        at
> com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:1
> 16)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.ja
> va:594)
>        at
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:491)
>        ... 34 more
>
> Thanks!
> Yaron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


Mime
View raw message