qq_29364415
Emmon_Meng
采纳率0%
2017-05-05 02:43 阅读 1.1k

ERROR Dispatcher Dispatcher initialization failed

刚开始学习ssh,遇到很多错误,这个错误按照网上的办法还是没有解决,我是用注解写的
jar包如下
[img=http://img.bbs.csdn.net/upload/201705/05/1493948850_356499.png][/img]
struts.xml如下
[code=html]
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">

<!-- 开启使用开发模式,详细错误提示 -->

<!-- 将对象交给spring管理 -->

<!-- 指定资源编码类型 -->

<!-- 指定每次请求到达,重新加载资源文件 -->

<!-- 指定每次配置文件更改后,自动重新加载 -->

<!-- 默认后缀名 -->
<!-- /> -->
<!-- Struts Annotation -->
<!-- -->

[/code]

ERROR Dispatcher Dispatcher initialization failed
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
.............
... 35 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:479)
at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:516)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:569)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:514)
at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:129)
... 41 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:427)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:477)
... 46 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410)
... 47 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:131)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:491)
at com.opensymphony.xwork2.inject.ContainerImpl$8.call(ContainerImpl.java:524)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:569)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:522)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.(PackageBasedActionConfigBuilder.java:130)
... 52 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:479)
at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:516)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:569)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:514)
at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:129)
... 58 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:289)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:422)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:477)
... 63 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:287)
... 65 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtils
at org.apache.struts2.convention.SEOActionNameBuilder.setActionSuffix(SEOActionNameBuilder.java:55)
... 70 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.xwork.StringUtils
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)
... 71 more

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

相关推荐