Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.3K
Visualizações
Cannot instantiate the type ResteasyClientBuilder

I am trying to build a simple Resteasy client, using proxy framework. I am getting a error, "Cannot instantiate the type ResteasyClientBuilder". This is the Client class.

package com.RestClient.Clients;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;

import com.RestClient.Models.Student;

public class ClientClass {
    ResteasyClient client;
    ResteasyWebTarget base_target,student_target;
    ClientInterface proxy;
    public ClientClass() {
        client = new ResteasyClientBuilder().build();<---------error
        base_target = client.target(UriBuilder.fromPath("http://localhost:8080/demorest/webresources/"));
        student_target = base_target.path("students");
    }
    public int registerStudent(Student s) {
        Response res = proxy.createStudent(s);
        return res.getStatus();
        
    }
}

I was following this tutorial.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Version 4.0.0 of RestEasy Client converted ResteasyClientBuilder to an abstract class and provided ResteasyClientBuilderImpl as the actual implementation that you're looking for.

But you should be using the new builder when generating a client.

client = ClientBuilder.newBuilder().build();
base_target = client.target("http://localhost:8080/demorest/webresources/");
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda