Automated Applications Upgrades for your Oracle WebLogic Server 15.1.1

Oracle WebLogic Server customers commonly operate large portfolios of business-critical applications. As the technology landscape evolves with new standards like Jakarta EE 9.1, innovations in frameworks such as Spring 6.2, and new releases of WebLogic Server timely upgrades become essential to maintain security, compliance, and compatibility. However, manual application upgrades can be costly, time-consuming, and error-prone, especially with complex distributed deployments and an increasing frequency of security updates.

Recognizing these challenges, our team is dedicated to empowering WebLogic customers with intelligent automation for application modernization. With the latest enhancements to our automated tooling, organizations can now more easily migrate applications from WebLogic 12.2.1.4 running on Java 8, WebLogic 14.1.1 on Java 8 or 11 and 14.1.2 running on Java 17 or 21 to WebLogic 15.1.1 running on Java 17 or 21 and Jakarta EE 9.1 leveraging the latest specifications and developer features. The WebLogic team is leveraging OpenRewrite and providing OpenRewrite recipes to automate your application upgrade process.

Background

OpenRewrite  is a robust, open-source refactoring engine for automating codebase upgrades at scale. Oracle WebLogic Server has adopted OpenRewrite and now delivers custom “recipes” designed specifically for enterprise Java migrations including high-scale moves to new Java SE, Spring, and Jakarta EE versions.

The new OpenRewrite recipes seamlessly address the significant namespace transition from javax.* to jakarta.* in Jakarta EE 9.1, and tackle update complexities in the Spring 6.2 framework and Hibernate 6.x. Updates are applied efficiently across all application code, minimizing human error and greatly speeding up the migration process.

We’re not the only ones relying on OpenRewrite. Many other companies and projects are leveraging OpenRewrite for migration. Take a look at OpenRewrite’s Recipe Catalog.

 

Rewrite-WebLogic Recipes

With the release of WebLogic Server 15.1.1, Oracle provides new OpenRewrite recipes to automate application upgrades from both WebLogic 12.2.1.4, 14.1.1 and 14.1.2. These enhancements complement Oracle’s ongoing effort to make both domain and application upgrades predictable, repeatable, and less risky.

What’s new in these upgraded recipes?

  • Automated migration of source and configuration files for compatibility with WebLogic 15.1.1
  • Comprehensive support for package migration to jakarta.* for Jakarta EE 9.1
  • Guidance and updates for upgrading to Spring 6.2 APIs and Hibernate 6.x
  • Handling of deployment descriptor and schema changes
  • Support for upgrading dependencies for JDK 17 and JDK 21
  • Flexible, composable recipes so you can combine WebLogic, JDK, Jakarta EE, and Spring migrations as needed

 

Upgrading: How to Use the Recipes

  1. Upgrade your JDK first.
    Use OpenRewrite’s UpgradeToJava17 or UpgradeToJava21 recipes, as appropriate.
  2. Apply the UpgradeTo1511 composite recipe
    This recipe will refactor and update your application sources and build configuration files for WebLogic 15.1.1 and Jakarta EE 9.1.

For WebLogic Server 15.1.1 upgrades, the new composite recipe UpgradeTo1511 bundles the necessary steps, including:

  • UpdateBuildToWebLogic 15.1.1
  • CheckAndCommentOutDeprecations for 15.1.1
  • JakartaNamespaceMigration
  • MigrateWebLogicSchemasTo 15.1.1
  • WebLogic 15.1.1 JavaXmlBindMitigation

Please note: Upgrading other third-party libraries or frameworks may require additional OpenRewrite community recipes.

For OpenRewrite to run, Maven dependencies must be resolved. If needed, run mvn clean install for missing dependencies, using Maven:

sh
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE,com.oracle.weblogic.rewrite:rewrite-weblogic:LATEST \
-Drewrite.activeRecipes=org.openrewrite.java.migrate.UpgradeToJava21,com.oracle.weblogic.rewrite.JakartaEE9_1,com.oracle.weblogic.rewrite.UpgradeTo1511 \
-Drewrite.exportDatatables=true

 

Important:

  • The WebLogic upgrade recipe should be run after the JDK upgrade recipe, which ensures proper clean-up and compatibility.
  • Review and test your application thoroughly after migration to address any third-party-specific issues not covered by these recipes.

 

Spring and Hibernate

If your application is running with Spring Framework 5.x on WebLogic 12.x or 14.x, and you want to migrate to Spring Framework 6.2.x, add the Spring Framework recipe to the command:

 

sh
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \ 
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE,com.oracle.weblogic.rewrite:rewrite-weblogic:LATEST,org.openrewrite.recipe:rewrite-spring:RELEASE \ 
-Drewrite.activeRecipes=org.openrewrite.java.migrate.UpgradeToJava21,com.oracle.weblogic.rewrite.JakartaEE9_1,com.oracle.weblogic.rewrite.UpgradeTo1511,com.oracle.weblogic.rewrite.spring.framework.UpgradeToSpringFramework_6_2 \ 
-Drewrite.exportDatatables=true

 

Note: When upgrading your application to Spring Framework 6.2.x, you may have other libraries that need to be updated. You can include the recipe in the same command, like org.hibernate, or run other third-party libraries separately.

 

Tutorials and Resources

Want to try OpenRewrite recipes for WebLogic 15.1.1? Check out our Migrate WebLogic Cafe to WLS 15.1.1  and Migrate Spring Framework Pet Clinic to WLS 15.1.1 tutorial for step-by-step instructions.
 

You can also find a walkthrough video on the OracleWebLogic YouTube channel Video Link.

 

Take-Aways and Next Steps

With these new automated tools and recipes, upgrading your WebLogic applications is faster, more reliable, and aligns with the latest in enterprise Java standards. Give it a try with your applications today! For questions or support, join the conversation in our #wls-app-upgrade-openrewrite Slack channel .

Further reading and resources: