ClassNotFoundException after upgrading from 1.12.2.Final to 1.13.1.Final

1,835 views
Skip to first unread message

David Hoffer

unread,
Apr 14, 2021, 10:45:57 AM4/14/21
to Quarkus Development mailing list
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder 
    at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:102) 
    at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:113)

I see in ClientBuilder this:
private static final String JAXRS_DEFAULT_CLIENT_BUILDER =
"org.glassfish.jersey.client.JerseyClientBuilder";

Was something removed in 1.13.1.Final?

How do I get org.glassfish.jersey.client.JerseyClientBuilder back?

-Dave

Stuart Douglas

unread,
Apr 14, 2021, 6:35:51 PM4/14/21
to David Hoffer, Quarkus Development mailing list
Do you have a reproducer?

This is generally the error you get if you try and use the client without resteasy present on the class path.

Stuart

On Thu, 15 Apr 2021, 12:46 am David Hoffer, <dhof...@gmail.com> wrote:
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder 
    at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:102) 
    at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:113)

I see in ClientBuilder this:
private static final String JAXRS_DEFAULT_CLIENT_BUILDER =
"org.glassfish.jersey.client.JerseyClientBuilder";

Was something removed in 1.13.1.Final

How do I get org.glassfish.jersey.client.JerseyClientBuilder back?

-Dave

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/958d6e5b-e30f-442a-a17c-6bad4fcf316dn%40googlegroups.com.

David Hoffer

unread,
Apr 14, 2021, 6:40:21 PM4/14/21
to Stuart Douglas, Quarkus Development mailing list
We do have the following in our dependencies.  Are you saying this should include the class in question?

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
-Dave

Stuart Douglas

unread,
Apr 14, 2021, 7:26:18 PM4/14/21
to David Hoffer, Quarkus Development mailing list
So the error message is deceptive, if no client is found it falls back to looking for the GlassFish one, and if it is missing it reports that it can't find that one (this is in the Spec API, so nothing we can do about it).

It looks like resteasy has split the client into a separate artifact, if you include 'quarkus-rest-client' it should work.

Stuart

David Hoffer

unread,
Apr 14, 2021, 7:36:36 PM4/14/21
to Stuart Douglas, Quarkus Development mailing list
Thanks!  We will add that.

-Dave

David Hoffer

unread,
Apr 19, 2021, 10:00:22 AM4/19/21
to Quarkus Development mailing list
I can confirm that adding quarkus-rest-client did resolve this issue.

-Dave

Reply all
Reply to author
Forward
0 new messages