struts2注解启动为什么报错?
严重: Exception starting filter struts2
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerBuilder$4
File: ContainerBuilder.java
Method: create
Line: 132 - com/opensymphony/xwork2/inject/ContainerBuilder.java:132:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
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:132)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:514)
at com.opensymphony.xwork2.inject.ContainerImpl$8.call(ContainerImpl.java:547)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:545)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:266)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
... 19 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:502)
at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
... 28 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:447)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
... 33 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:426)
... 34 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.FileManager, name='default'] in public void org.apache.struts2.convention.PackageBasedActionConfigBuilder.setFileManager(com.opensymphony.xwork2.FileManager).
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:514)
at com.opensymphony.xwork2.inject.ContainerImpl$8.call(ContainerImpl.java:547)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:545)
at org.apache.struts2.convention.ClasspathConfigurationProvider.<init>(ClasspathConfigurationProvider.java:47)
... 39 more
Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.FileManager, name='default'] in public void org.apache.struts2.convention.PackageBasedActionConfigBuilder.setFileManager(com.opensymphony.xwork2.FileManager).
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:502)
at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
... 45 more
Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.FileManager, name='default'] in public void org.apache.struts2.convention.PackageBasedActionConfigBuilder.setFileManager(com.opensymphony.xwork2.FileManager).
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.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(ReferenceCache.java:76)
at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:356)
at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:311)
at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:307)
at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.o
pensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:607)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:498)
... 50 more
Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.FileManager, name='default'] in public void org.apache.struts2.convention.PackageBasedActionConfigBuilder.setFileManager(com.opensymphony.xwork2.FileManager).
at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:293)
at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:117)
at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:114)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:141)
... 69 more
版本最好选同一个struts下的版本,否则冲突很难搞,保存一个完整项目的源码,ssh,ssi,或者现在开始流行的ssm(spring,springmvc, mybatis ), 这样集成的项目,各个版本的框架jar都会是完整版本兼容的,当然后续可能你用到其他jar,但不会再出现这么大这么多的兼容性jar问题, 有也是可以定位到某一个jar,比如jdbc的,common-lang的或者netty等这类,比较容易找出。稳定的重要的项目肯定是不会轻易换jar,所以也不用怕我的jar版本不是官方最新啊,我的jar是不是功能缺少啊等等问题,祝你好运~
- 等 最代码怎么获取牛币啊?
- 完 谁来告诉我最代码上线的时间,答对者给5牛币,先来先得
- 等 牛友们,大家好,你们做程序员多久了?现在还好吗?
- 完 在微信打开的页面里进行app下载
- 等 最代码2014年欢乐聚声会
- 完 mysql如何查询表数据并且对3个字段降序的SQL?
- 完 最代码牛币机制改革
- 完 成功的在bae上使用了自定义运行环境 jetty+nginx的组合,大家对jetty+nginx优化有哪些心得?
- 完 进来分享一下各位牛牛是如何加入最代码大家庭的?
- 等 为什么java BufferedImage类处理大图直接抛出内存溢出的异常?
- 等 最代码是否开发手机app客户端?
- 完 java程序员学习哪些java的技术?java有哪些框架?都能做哪方面的开发?
- 等 php格式网页文件怎么运行?
- 等 Java volatile值获取的问题
- 等 前端vue,拦截了登录后台后,返回的token,requests拦截token,但是发送请求的时候,就出现跨越异常
- 等 大专本科计算机科班怎么找到Java工作?
- 等 eclipse怎么把三个java swing游戏项目合成一个项目?
- 完 伙伴们,大家都有什么好的解压方式么,分享一下~
- 完 三四线城市,6、7k,运维工作,索然无味,想去辞职上培训,各位牛牛有什么建议嘛
- 等 jsp页面输入中文变成问号
- 等 JPA在线上运行一段时间后报错Caused by: java.lang.IncompatibleClassChangeError: null
- 等 PHP 这个规则用preg_match_all怎么写
- 等 大佬们,有没有知道Alfresco如何配置LDAP登录呢?
- 等 php的install目录是框架带的吗?
- 完 Struts2标签为什么没有输出?
- 等 struts2异常No result defined for action *.action and result fail如何解决?
- 等 Struts2拦截器配置StrutsPrepareAndExecuteFilter但是在jsp页面输入的中文还是显示乱码?
- 完 struts2中怎么实现导航栏(导航分类在数据库中)出现在每个页面?
- 等 Struts2中的Unable to load configuration异常如何解决?
- 等 struts2标签<s:radio> list集合里面的数据如何横排显示?
- 等 struts2实现注册登录,注册的用户为什么无法登录?
- 完 struts2文件上传可以成功,但为什么不上传到自己新建的工程upload文件夹里面呢?
- 等 Struts2开发http接口为移动端返回json数据合适吗?有安全或者其它问题吗?
- 完 struts2 ognl使用s:set标签生成集合对象的实际应用?
- 完 java mvc开源框架spring mvc和struts2哪个更好用?
- 等 struts2+hibernate实现登录怎么做呀??求大神解决这小小的问题