STRUTS 2.2.1报错,启动不了

转载 2011年01月13日 11:00:00

 

严重: Dispatcher initialization failed
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
 at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
 at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
 at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
 at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
 at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
 at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
 at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
 at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:252)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 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:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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:566)
 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.reflect.InvocationTargetException
 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 com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
 ... 42 more
Caused by: java.lang.ExceptionInInitializerError
 at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:85)
 ... 47 more
Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!
 at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)
 ... 48 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPool
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:162)
 ... 48 more
2010-12-9 17:23:07 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 295 - com/opensymphony/xwork2/inject/ContainerImpl.java:295:-1
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 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:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 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:566)
 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: java.lang.reflect.InvocationTargetException
 at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
 at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
 at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
 at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
 at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
 at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
 at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
 at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
 at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:252)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
 ... 29 more
Caused by: java.lang.reflect.InvocationTargetException
 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 com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
 ... 42 more
Caused by: java.lang.ExceptionInInitializerError
 at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:85)
 ... 47 more
Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!
 at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)
 ... 48 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPool
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:162)
 ... 48 more

 

在使用struts-2.2.1时,需要引入javassist-3.7.ga.jar,而这个在struts-2.2.1/lib下是没有的,需要在struts-2.2.1/apps/struts2-blank-2.2.1.war下的lib中找。

 

通过这个总结出一点经验:每个版本需要的包可能不一样,所以最快捷的方式是下载struts-2.2.1-all.zip,应用实例中最简单的struts2-blank中导入的包就是最基本的包。比如,2.1.x版本中需要commons-logging-1.0.4.jar,2.2.1中就不需要了。

 

相关文章推荐

[Struts2]Caused by: com.opensymphony.xwork2.inject.DependencyException:

Exception description: 七月 17, 2012 10:14:26 下午 org.apache.catalina.core.StandardContext filterStart...
  • suplxj
  • suplxj
  • 2012-07-17 22:32
  • 8487

web ssh项目com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException异常及解决方法

今天web项目遇到了一个很奇葩的异常,异常信息如下:  com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException...

关于wamp安装完毕之后httpd.exe报错以及localhost的80端口被占用启动不了apache

我在网上找了一个wamp 64位的包3.04版本,一步一步按照提示安装完成之后。准备开始运行以后,报出httpd.exe错误。然后我在浏览器输入了localhost之后出现了水之后我又检查了一下是以为...

Mysql启动不了报错Timeout error 磁盘满

Mysql启动不了报错Timeout error 磁盘满   在linux下找不到mysql.sock怎么办? 一、 Error: Can't connect to local MySQL serve...

启动tomcat报错:exception starting filter struts2 unable to load configuration.代码没有任何问题

启动tomcat报错:exception starting filter struts2 unable to load configuration.代码没有任何问题 我的代码没有任何...

Tomcat 启动报错 in public void org.apache.struts2.osgi.OsgiConfigurationProvider.setVelocityManager

错误信息如下: 严重: Exception starting filter struts2 java.lang.RuntimeException: com.opensymphony.xwork2....
  • lhzjj
  • lhzjj
  • 2012-04-04 06:41
  • 3187

新手:Struts2.0.9部署后启动Tomcat6报错解决

我是新手,初学struts,记录下错误。 Tomcat版本:Tomcat-6.0.18 MyEclipse版本:MyEclipse 8.5 Struts版本:struts-2.0.9 部署到T...
  • zht666
  • zht666
  • 2012-08-17 15:46
  • 24748

项目启动报错:SEVERE: Exception starting filter struts2

1、错误描述 今天想要搭建一个简单的Struts环境做功能测试,但是项目的启动的时候报错,具体错误内容如下: SEVERE: Exception starting filter struts2...

struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1

原址:http://javeye.iteye.com/blog/940122 好久没有搞struts2,今天配置strut2.2.1,启动时遇到个小问题。记录下。 tomcat启动报错: Cla...

Struts2启动过程中报错java.lang.ClassNotFoundException完美解决方案

具体报错部分代码如下 严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)