s499820228
小林_sxxzlt
采纳率0%
2017-03-10 01:32 阅读 3.5k

struts2.3.16升级到2.3.32报错

报错信息如下,哪位大神遇到过这种问题,原来2.3.16的时候没有出这种问题。
其中的subclass not inject manager to action sucessful.是项目中的提示语句

ERROR [org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler] -
Unable to instantiate Action, org.my431.base.web.LoginAction, defined for 'Login/validateUser' in namespace '/login'Error creating bean with name 'org.my431.base.web.LoginAction': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: subclass not inject manager to action sucessful. - action - file:/D:/workspace/base170217hlj/gb_mis_base/trunk/webapp/WEB-INF/classes/struts/struts-base.xml:8:78
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:317)
at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:398)
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:194)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:565)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.my431.base.web.LoginAction': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: subclass not inject manager to action sucessful.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:386)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:195)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:164)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:178)
at com.opensymphony.xwork2.factory.DefaultActionFactory.buildAction(DefaultActionFactory.java:22)
at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:148)
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:298)
... 31 more
Caused by: java.lang.IllegalArgumentException: subclass not inject manager to action sucessful.
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.my431.platform.web.StrutsTreeEntityAction.afterPropertiesSet(StrutsTreeEntityAction.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 38 more

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

1条回答 默认 最新

  • HackAge4619 写给初学者的几封信 2017-03-10 01:42

    每个版本升级都会有细微的变化的;
    报错Invocation of init method failed(初始化方法的调用失败),是不是版本升级中改了动态方法调用的配置true-false,在struts.xml中
    DynamicMethodInvocation" value="true" 改成false,如果是false改成true 试下;
    了解更多建议引入jar源码看看。

    点赞 评论 复制链接分享

相关推荐