-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
When calling a rest endpoint that returns a List from a native application using smallrye rest client;
e.g.
@Inject
@RestClient
IWidgetsService widgetsService;
...
private List<String> getWidgets() {
return widgetsService.getWidgets();
}
with IWidgetsService defined as;
@Path("/")
@Produces("application/json")
@RegisterRestClient
public interface IWidgetsService {
@GET
@Path("widgets")
List<String> getWidgets() ;
}
Causes the following exception;
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.util.ArrayList` (no Creators, like default construct, exist): no default no-arguments constructor found
at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 1]
We need to register ArrayList for reflection so that it is available at runtime in the native service
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working