struts
struts copied to clipboard
WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2
This PR only moves classes from package com.opensymphony.xwork2 into org.apache.struts2. It also updates all resource referenced by com/opensymphony/xwork2 to use org/apache/struts2
Closes WW-3714
I just noticed, once this PR gets merged it won't possible to reverse merge changes from the master branch (or at least it will be super hard). I will postpone merging this PR.
Quality Gate failed
Failed conditions
7 Security Hotspots
71.4% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
Hello @lukaszlenart
Separate issue with latest Struts 7.0.0-M9 version,
We are currently using Struts version 6.3.x and are in the process of migrating to version 7. However, during the migration to version 7 M9, our wildcard actions are failing and resulting in the following error. We suspect that this functionality may be broken. Could you please investigate this issue for us?
ERROR : traceId:66f67fed9ea225686ca52ace9200d1f3][spanId:6ca52ace9200d1f3][parentSpanId:][spanExportable:false][bt:2024_09_27_11_21_51][ajp-nio-0.0.0.0-10009-exec-5][2024-09-27 15:20:37,777]- org.apache.struts2.dispatcher.Dispatcher.logConfigurationException:Line 805 - Could not find action or result: /contextName/flag/flag_0.gif com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/flag] and action name [flag_0] associated with context path [/contextName]. at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:183) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:57) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:32) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:60) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.Dispatcher.createActionProxy(Dispatcher.java:781) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.Dispatcher.prepareActionProxy(Dispatcher.java:767) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:730) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.handleRequest(StrutsPrepareAndExecuteFilter.java:163) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.tryHandleRequest(StrutsPrepareAndExecuteFilter.java:146) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:134) ~[struts2-core-7.0.0-M7-SNAPSHOT.jar:7.0.0-M7-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at com.abc.configuration.hazelcast.filter.HighQHazelcastSessionEndAccessFilter.doFilter(HighQHazelcastSessionEndAccessFilter.java:18) ~[main/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at com.abc.filter.PreventRecycleRequestAccessFilter.doFilter(PreventRecycleRequestAccessFilter.java:41) ~[main/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.1.8.jar:6.1.8] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.8.jar:6.1.8] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.1.8.jar:6.1.8] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.8.jar:6.1.8] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) ~[spring-session-core-3.2.3.jar:3.2.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at com.abc.configuration.hazelcast.filter.HighQSessionRepositoryFilter.doFilterInternal(HighQSessionRepositoryFilter.java:70) ~[main/:na] at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82) ~[spring-session-core-3.2.3.jar:3.2.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:109) ~[spring-web-6.1.8.jar:6.1.8] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.8.jar:6.1.8] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.1.8.jar:6.1.8] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.8.jar:6.1.8] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:431) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:904) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) ~[tomcat-embed-core-10.1.25.jar:10.1.25] at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Thank you
@YogeshPatelTR I'm not too familiar with the wildcard mapping capability but it may not be compatible with strict namespace resolution which is now enabled by default. Refer to the migration guide for more details.
@lukaszlenart | @kusalk - can you please help with final/tentative release date of v7.0.0 ?
@lukaszlenart Rebased for you :)
I'm currently also looking into whether any of this repackaging can be done in 6.x in a non-breaking cross-compatible way as it would ease migration for large, complex codebases. Seems difficult though
Rebasing following the forward merge of compatibility changes in 6.x
Rebasing following the forward merge of compatibility changes in 6.x
Oh no, I missed that and rebased again :(
@lukaszlenart All good, looks like the conflicts weren't resolved anyway, I will force push when I'm done, this is a tricky one
Thanks a lot @kusalk ❤️
@lukaszlenart No problem 🙂 - I think it should be good to go now - feel free to give it a look-over before merging
Quality Gate failed
Failed conditions
7 Security Hotspots
70.5% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
Hi @lukaszlenart @kusalk Do we have plan to change package in struts2-dwr-plugin as well?
No as DWR doesn't support JakartaEE and has been removed.