tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaohua Wang" <chaohua.w...@premierdata.com>
Subject unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory
Date Tue, 05 Feb 2008 20:15:45 GMT

Hi folks,

I am learning and run the example in apache-tomcat-5.5.23
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

Although I used all jar files from this tutorial. Please help! Thank you
very much:

But I got the following error

Chaohua

---------------------------
Feb 5, 2008 12:29:58 PM org.apache.catalina.core.StandardContext
filterStart
SEVERE: Exception starting filter struts2
Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory
class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean -
jar:file:/C:/apache-tomcat-5.5.23/webapps/ROOT/WEB-INF/lib/struts2-sprin
g-plugin-2.0.11.jar!/struts-plugin.xml:30:132
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.regist
er(XmlConfigurationProvider.java:208)
	at
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(Struts
XmlConfigurationProvider.java:101)
	at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultC
onfiguration.java:131)
	at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Con
figurationManager.java:52)
	at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispa
tcher.java:395)
	at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
	at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.jav
a:201)
	at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
lterConfig.java:221)
	at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicatio
nFilterConfig.java:302)
	at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilte
rConfig.java:78)
	at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.jav
a:3635)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4222
)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:9
20)
	at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java
:883)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
1)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:120)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationContextAware
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1847)
	at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:873)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1326)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1205)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1847)
	at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:873)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1326)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1205)
	at
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.j
ava:139)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.regist
er(XmlConfigurationProvider.java:180)
	... 33 more
Feb 5, 2008 12:29:59 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 5, 2008 12:29:59 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message