struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YaronGo <yarongo...@msn.com>
Subject Re: Problem with Spring plugin
Date Fri, 01 May 2009 23:43:49 GMT

I'm using the spring.jar file from Spring Framework's dist directory. I also
tried using version 2.08, and using spring-core.jar, spring-web.jar,
spring-context.jar and spring-beans.jar from the modules directory instead
of spring.jar, but got the same results.

I tried instead to use the spring jars that came with the struts
distribution (spring-context-2.5.3.jar, spring-core-2.0.8.jar,
spring-beans-2.5.3.jar, spring-web-2.5.3.jar) and got the following:

SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

When I tried to find that class in any those jars, I came up blank.

Ideas?

Thanks!
YaronGo


YaronGo 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-Spring-plugin-tp23328610p23341493.html
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


Mime
View raw message