Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2 #1036

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented Sep 1, 2024

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

@lukaszlenart lukaszlenart marked this pull request as draft September 1, 2024 05:48
@lukaszlenart lukaszlenart force-pushed the feature/WW-3714-rename branch 2 times, most recently from ae34e2c to 9f6e8af Compare September 1, 2024 07:59
@lukaszlenart lukaszlenart marked this pull request as ready for review September 1, 2024 08:12
@lukaszlenart
Copy link
Member Author

lukaszlenart commented Sep 2, 2024

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.

Copy link

sonarcloud bot commented Sep 11, 2024

Quality Gate Failed 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

@YogeshPatelTR
Copy link

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

@kusalk
Copy link
Member

kusalk commented Sep 28, 2024

@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.

@YogeshPatelTR
Copy link

@lukaszlenart | @kusalk - can you please help with final/tentative release date of v7.0.0 ?

@kusalk
Copy link
Member

kusalk commented Oct 16, 2024

@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

@kusalk kusalk changed the base branch from release/struts-7-0-x to 7.0.x/merge-master-2024-11-01 November 1, 2024 05:31
@kusalk
Copy link
Member

kusalk commented Nov 1, 2024

Rebasing following the forward merge of compatibility changes in 6.x

Base automatically changed from 7.0.x/merge-master-2024-11-01 to release/struts-7-0-x November 1, 2024 06:14
@lukaszlenart
Copy link
Member Author

Rebasing following the forward merge of compatibility changes in 6.x

Oh no, I missed that and rebased again :(

@kusalk
Copy link
Member

kusalk commented Nov 1, 2024

@lukaszlenart All good, looks like the conflicts weren't resolved anyway, I will force push when I'm done, this is a tricky one

@lukaszlenart
Copy link
Member Author

Thanks a lot @kusalk ❤️

@kusalk
Copy link
Member

kusalk commented Nov 1, 2024

@lukaszlenart No problem 🙂 - I think it should be good to go now - feel free to give it a look-over before merging

Copy link

sonarcloud bot commented Nov 1, 2024

Quality Gate Failed 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

Copy link
Member Author

@lukaszlenart lukaszlenart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@lukaszlenart lukaszlenart merged commit 99434d9 into release/struts-7-0-x Nov 1, 2024
6 of 7 checks passed
@lukaszlenart lukaszlenart deleted the feature/WW-3714-rename branch November 1, 2024 16:17
@dipakTankTR
Copy link

Hi @lukaszlenart @kusalk Do we have plan to change package in struts2-dwr-plugin as well?

@lukaszlenart
Copy link
Member Author

No as DWR doesn't support JakartaEE and has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants