Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

General guidelines to migrate from WildFly 17 to WildFly 34

242 views
Skip to first unread message

Tanmay Majumdar

unread,
Nov 8, 2024, 11:09:34 AM11/8/24
to WildFly
Hi Everyone, 

I am currently in the process of migrating our legacy app from WildFly 17 with Struts 2 and Java 8 to WildFly 34 with Struts 7 and Java 21. 

As you can see, its going to be an adventure :)

While I am doing my own research, I would really love to hear any general "gotchas" that we should be looking for. I am also going to point out few things  that I have noticed. I would be extremely grateful, if someone else can also point anything (or even generic advice) that I am missing.

1. We won't be able to perform the update, unless we upgrade our Java to atleast Java 11 (recommended is Java 21, but since WildFly 17 is not compatible with Java 17. We first need to migrate to Java 11)
2. Our javax namespaces needed to be changed to jakarta. 
3. I have noticed that the legacy security domains are not supported anymore. Therefore, we need to change those to elytron security domains. 
4. I am hoping that the JBoss Server Migration Tool helps us in changing the standalone files atleast. Since we also modify the standalone file in run time, our application level codes will also have to be modified according to the latest standalone schema. 
5. One big hurdle is Struts 7 and WildFly 17 are not compatible with each other. Therefore, both Struts and WildFly will have to upgraded simultaneously and this might create lots of ambiguity during troubleshooting. 
6. Whenever we reach the point of stability with Java 11, Struts 7 and WildFly 34. We can then consider and see if there's enough disposable timeline for Java11 to Java 21 upgrade. 


Wolfgang

unread,
Nov 9, 2024, 5:17:31 AM11/9/24
to WildFly

Hi,

3. I would suggest that you migrate to WildFly 26.1.3 first (which covers the security changes), then do the JakartaEE 10 upgrade. I fear the migration tool will not do the full necessary conversion.

5. you could first migrate to Struts 6, which is JavaEE8 based.
The struts 7 migration might be a big pain, I did it for a small project. In case you don't know those guides: https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration and https://cwiki.apache.org/confluence/display/WW/Struts+6.x.x+to+7.x.x+migration. Good news: the biggest change ("Action parameter injection") can be switched off in the struts config.

Hope this helps

Wolfgang

Teixi

unread,
Dec 21, 2024, 9:12:26 AM12/21/24
to WildFly
With the mentioned Server Migration Tool https://github.com/wildfly/wildfly-server-migration worked for your case?
Did you try migrate WildFly 17 to 26.1.3 and it worked automatically ?

If not the case, completely agree with @Wolfgang that the proper approach, and that worked for me, is only just 1 step and test it fully before, next one.
Would suggest an stepped approach something like this:
  1. WildFly 26.1.3 + Jakarta EE 8 + Java SE 8
    1. Upgrade app & WildFly configuration to WildFly 26.1.3 for WildFly Elytron based security 
    2. Read both https://www.wildfly.org/news/2021/12/16/WildFly26-Final-Released/ & https://docs.wildfly.org/26/Migration_Guide.htm
    3. Best case scenario  you just need the Elytron Tool https://github.com/wildfly-security/wildfly-elytron/tree/2.x/tool
      1. Legacy Properties files https://justinwildfly.blogspot.com/2019/02/converting-legacy-propeties-files-into.html
      2. Migrate Vaults with https://docs.wildfly.org/26/WildFly_Elytron_Security.html#Migrating_Existing_Vaults
      3. Migrate Configuration https://docs.wildfly.org/26/WildFly_Elytron_Security.html#Simple_SSL_Migration
    4. Else start with a clean 26.1.3 installation and configure elytron, then adapt your app.
    5. Canary release for test validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 8 to the smallest combination set of servers for the smallest set of users possible.
    6. Full release for full validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 8 to all servers and for all users.
  2. WildFly 26.1.3 + Jakarta EE 8 + Java SE 11
    1. Upgrade to Struts 6
    2. Upgrade app & other libraries from Java SE 8 to Java SE 11
    3. Canary release for test validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 11 to the smallest combination set of servers for the smallest set of users possible.
    4. Full release for full validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 11 to all servers and for all users.
  3. WildFly 26.1.3 + Jakarta EE 8 + Java SE 17
    1. Upgrade to Struts 7
    2. Upgrade app & other libraries from Java SE 11to Java SE 17
    3. Canary release for test validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 17 to the smallest combination set of servers for the smallest set of users possible.
    4. Full release for full validation deploy to production with WildFly 26.1.3 + Jakarta EE 8 + Java SE 17 to all servers and for all users.
  4. WildFly Preview 26.1.3 + Jakarta EE 10 + Java SE 17
    1. Read https://www.baeldung.com/java-jakarta-enterprise-edition-migration https://www.mastertheboss.com/java-ee/jakarta-ee/simplifying-to-migration-to-jakarta-ee-with-tools/
      1. Migrate source code & libraries dependencies with one of these 5 tools:
        1. Eclipse Transformer https://github.com/eclipse-transformer/transformer
        2. Apache Tomcat migration tool for Jakarta EE https://github.com/apache/tomcat-jakartaee-migration 
          1. Gradle version https://github.com/nebula-plugins/gradle-jakartaee-migration-plugin
        3. OpenRewrite Migrate to Jakarta EE 9 https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxmigrationtojakarta to EE 10 
        4. OpenRewrite Migrate to Jakarta EE 10 https://docs.openrewrite.org/recipes/java/migrate/jakarta/jakartaee10
        5. IntelliJ IDEA's refactoring tool https://www.jetbrains.com/guide/java/tutorials/migrating-javax-jakarta/use-migration-tool/
      2. With one of these tools (Apache Tomcat migration tool worked for me. WildFly Preview integrates Eclipse transform to transform EE 8 deployed jars to EE 10)
        1. Try first direct migration EE 8 to EE 10 in case of issues then EE 8 to EE 9.1
        2. Transform source code
        3. Upgrade dependencies to their version compatible with EE 10
        4. Transform dependencies incompatible with EE 10
    2. Upgrade to Struts 7
    3. Canary release for test validation deploy to production with WildFly Preview 26.1.3 + Jakarta EE 10 + Java SE 17 to the smallest combination set of servers for the smallest set of users possible.
    4. Full release for full validation deploy to production with WildFly Preview 26.1.3 + Jakarta EE 10 + Java SE 17 to all servers and for all users.
  5. WildFly 34.0.1 + Jakarta EE 10 + Java SE 21
    1. Once you get here, automatically switching to latest WildFly release for EE 10 with Java SE 21 should be automatically guaranteed without issues ;)
      1. Then you are ready to test EE 11 in Preview https://www.wildfly.org/news/2024/10/17/WildFly34-Released/
It seems a lot, but once you get the first 2 steps of migration to WildFly Elytron, and migration to Struts 6 properly done, the rest of the steps should be easily automated ;)

Reply all
Reply to author
Forward
0 new messages