WildFly Upgrade 27 with Java EE 10

1,037 views
Skip to first unread message

Pulak Agarwal

unread,
Apr 12, 2023, 10:47:11 AM4/12/23
to WildFly
Hello,

My application is currently deployed on wildfly 26, having following components.
  • JAVA EE 8
  •  Spring Framework 5.x
  • JDK 11
I have to upgrade from Wildfly 26 to wildfly 27, for which I understand the major change to be adapt JAVA EE 10, which includes packages changed to jakarta.xxx.

But for this, Spring Framework also needs to be upgraded to 6.x, which implicit requires JDK 17.

It implies, I need to upgrade my JDK from 11 to 17, which for now is not feasible due to project requirement.

If I follow announcement from [Brian Stansberry](New wildfly-deployment-transformer-feature-pack), this will internally convert javax.* to jakarta.*, But If I understand correct, it is internally using JAVA EE 10, which ultimately be needing JDK 17 because of Spring 6.x

Please correct my understanding, will this tool be internally using javax.* to support existing version of Spring Framework and JDK 11.

Thanks
Pulak 

Brian Stansberry

unread,
Apr 12, 2023, 10:59:53 AM4/12/23
to WildFly
Hi Pulak,

If you include a javax based version of Spring in your deployment, it will transform all the uses of javax in both the Spring jars and your own class files to use jakarta. So there would be no need to move to Spring 6 and SE 17.

You'd need to test of course, as there are other differences between EE 8 and EE 10.

Best regards,
Brian 

Pulak Agarwal

unread,
Apr 13, 2023, 6:11:49 AM4/13/23
to WildFly

Thanks Brian for your quick response.

I was successfully able to add New wildfly-deployment-transformer-feature-pack in wildfly27, with sample application using javax.*. (Thanks to this feature pack).

But when I tried to integrate this pack in my actual application, It started failing at different places at startup.

[org.jboss.modules.define] Failed to define class org.springframework.web.servlet.tags.form.TextareaTag in Module "a.b.c.d.e" from local module loader @66f11319 (finder: local module finder @119985eb (roots: D:\Sample\server\ext\appserver\modules,D:\Sample\server\ext\appserver\modules\system\layers\base,D:\Sample\server\ext\appserver\modules\system\add-ons\wildfly-deployment-transformer)): java.lang.NoClassDefFoundError: Failed to link org/springframework/web/servlet/tags/form/TextareaTag (Module "a.b.c.d.e" from local module loader @66f11319 (finder: local module finder @119985eb (roots: D:\Sample\server\ext\appserver\modules,D:\Sample\server\ext\appserver\modules\system\layers\base,D:\Sample\server\ext\appserver\modules\system\add-ons\wildfly-deployment-transformer))): Failed to link org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag (Module "a.b.c.d.e" from local module loader @66f11319 (finder: local module finder @119985eb (roots: D:\Sample\server\ext\appserver\modules,D:\Sample\server\ext\appserver\modules\system\layers\base,D:\Sample\server\ext\appserver\modules\system\add-ons\wildfly-deployment-transformer))): Failed to link org/springframework/web/servlet/tags/form/AbstractHtmlElementTag (Module "a.b.c.d.e" from local module loader @66f11319 (finder: local module finder @119985eb (roots: D:\Sample\server\ext\appserver\modules,D:\Sample\server\ext\appserver\modules\system\layers\base,D:\Sample\server\ext\appserver\modules\system\add-ons\wildfly-deployment-transformer))): javax/servlet/jsp/tagext/DynamicAttributes
at java.base/java.lang.ClassLoader.defineClass1(Native Method)


It is not able to find some of the javax components like 
  • javax/servlet/jsp/tagext/DynamicAttributes
  • javax/servlet/Filter
  • javax/servlet/jsp/tagext/BodyTagSupport
  • and many more.....

Could you please help me understand what I am missing around ?

Thanks
Pulak

Brian Stansberry

unread,
Apr 13, 2023, 10:12:29 AM4/13/23
to WildFly
I believe module a.b.c.d.e is a static module you've put in the $WILDFLY_HOME/modules dir.  The deployment transformer does not do transformation of module resources. It only processes the content of deployment archives. Static module resources need to use jakarta.*.

I think you have a couple options:

1) Move the javax resources out of the static module and include them in deployment. This has drawbacks of course, in terms of how you manage your code.

2)  Transform the javax resources yourself and put the transformed archives in your a.b.c.d.e module instead of the untransformed ones. The Eclipse Transformer project (https://github.com/eclipse/transformer) provides tooling for doing this kind of thing. Under the covers the deployment transformer feature pack uses Eclipse Transformer to do the actual transformation.

In general, if you can't use native jakarta.* libraries, transforming your javax.* ones yourself is a better approach than relying on WildFly to do it for you, particularly for more complex installations. The deployment transformer feature pack is meant to ease the path for some use cases but it definitely has limitations.

Best regards,
Brian

Brian Stansberry

unread,
Apr 14, 2023, 4:46:29 PM4/14/23
to WildFly
FYI, I did a 1.0.0.Final release of the feature pack. Discussed more at https://groups.google.com/g/wildfly/c/hVbijKO7do8/m/0KYdborHBgAJ.
Reply all
Reply to author
Forward
0 new messages