我正在尝试将struts从2.2.1.1版本升级到2.5.17。但是在将其升级到2.5.17并升级了更多的依赖项之后,我得到了运行时异常以下的限制吗?我还升级了jar,例如jquery插件,tiles,ognl,dojo等。
我正在尝试将struts从2.2.1.1版本升级到2.5.17。但是在将其升级到2.5.17并升级了更多的依赖项之后,我得到了运行时异常以下的限制吗?我还升级了jar,例如jquery插件,tiles,ognl,dojo等。
任何人都可以建议。
发生异常:
java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [LoginAction]
org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:97)
org.apache.struts2.convention.ConventionUnknownHandler.determinePath(ConventionUnknownHandler.java:376)
org.apache.struts2.convention.ConventionUnknownHandler.handleUnknownResult(ConventionUnknownHandler.java:272)
com.opensymphony.xwork2.DefaultUnknownHandlerManager.handleUnknownResult(DefaultUnknownHandlerManager.java:95)
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:223)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:279)
com.aniket.web.struts.interceptors.CDMVI18nInterceptor.intercept(CDMVI18nInterceptor.java:43)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:48)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
com.aniket.web.filter.EncodingFilter.doFilter(EncodingFilter.java:41)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3701)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3667)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269)
weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1703)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1663)
weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
java.lang.ClassNotFoundException: LoginAction
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:104)
weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:89)
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:179)
org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:95)
org.apache.struts2.convention.ConventionUnknownHandler.determinePath(ConventionUnknownHandler.java:376)
org.apache.struts2.convention.ConventionUnknownHandler.handleUnknownResult(ConventionUnknownHandler.java:272)
com.opensymphony.xwork2.DefaultUnknownHandlerManager.handleUnknownResult(DefaultUnknownHandlerManager.java:95)
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:223)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:279)
com.aniket.web.struts.interceptors.CDMVI18nInterceptor.intercept(CDMVI18nInterceptor.java:43)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:48)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
com.aniket.web.filter.EncodingFilter.doFilter(EncodingFilter.java:41)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3701)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3667)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269)
weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1703)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1663)
weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
答案 0 :(得分:0)
我通过替换以下内容解决了此问题:
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
与:
<context-param>
<param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
根据以下文档,我们不必在升级到struts 2.5后的web.xml中指定tile.xml路径。但是对于weblogic服务器,情况并非如此。
https://cwiki.apache.org/confluence/display/WW/Struts+2.3+to+2.5+migration