struts2.0 web.xml配置问题解决

严重: Exception starting filter struts2Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/E:/testStruts2.0/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/testStruts2.0/WEB-INF/lib/struts2-spring-plugin-2.0.11.1.jar!/struts-plugin.xml:30:132 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3540) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4110) 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.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)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(WebappClassLoader.java:1629) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) 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(WebappClassLoader.java:1629) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:139) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:180) ... 24 more- Error filterStart- Context [/testStruts2.0] startup failed due to previous errors- Starting Coyote HTTP/1.1 on http-8082- JK: ajp13 listening on /0.0.0.0:8019- Jk running ID=0 time=0/110  config=null- Find registry server-registry.xml at classpath resource- Server startup in 2594 ms

   解决方法: 去掉struts2-spring-plugin-2.0.11.1.jar 包 去掉struts2.0 里面所有的带 -plugin 后缀的包 ,如果你没有用到的话.

刷新工程 ,删除服务器, 建立新的服务器(tomcat 5.x )

阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭