Re: Facing issues with unit tests after upgrading to Wildfly 32

961 views
Skip to first unread message
Message has been deleted

Christoffer A. Nilsen

unread,
May 31, 2024, 7:10:58 AM5/31/24
to WildFly
Sounds like your project still have dependency on javax.ws.rs:javax.ws.rs-api instead of jakarta.ws.rs:jakarta.ws.rs-api
How are your unit tests related to Wildfly, except that you want to migrate to Jakarta because of Wildfly 32?
On another note, you cannot just rename all javax package references/imports to jakarta. There still exist JDK javax packages that should not be renamed to jakarta, examples such as javax.naming.* and javax.sql.*.
torsdag 30. mai 2024 kl. 11:02:12 UTC+2 skrev Bharath Anandateertha:
Hi everyone,

I have renamed javax.* to jakarata.* as part of Wildfly 32 upgrade from 26.
This fixed a lot of deployment issue but when I execute unit tests, I am getting the below error.

java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.ext.RuntimeDelegate cannot be found
        at jakarta.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:163)
        at jakarta.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:103)
        at jakarta.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:88)
        at jakarta.ws.rs.core.Response$ResponseBuilder.newInstance(Response.java:776)
        at jakarta.ws.rs.core.Response.status(Response.java:522)
        at jakarta.ws.rs.core.Response.status(Response.java:533)
        at jakarta.ws.rs.WebApplicationException.<init>(WebApplicationException.java:230)
        at jakarta.ws.rs.WebApplicationException.<init>(WebApplicationException.java:52)

If I change jakarta reference to javax, unit tests are passing.

James Perkins

unread,
May 31, 2024, 1:03:44 PM5/31/24
to WildFly
For this specific instance, check the version of RESTEasy you're depending on. You'd want to use 6.2.9.Final (latest) or 6.2.8.Final which is what is currently in WildFly 32 with 6.2.9.Final coming in 32.0.1.Final.
Reply all
Reply to author
Forward
0 new messages