During deserialization gwt-jackson throws an error: Can't instantiate ChanceResource.
I've copied the pattern from CarStore where CarsResource returns the subresource CarResource but must have missed something..
ChanceResource is an interface so obviously can't be instantiated but in CarStore CarResource is the same and works fine:
Here are the relevant jax-rs interfaces. All the calls work fine on the server.
@Produces(MediaType.APPLICATION_JSON)
public interface BaseResource<T extends MPEntity<T>> {
@GET
List<T> getAll();
@GET
@Path(ApiPaths.ID)
T get(@PathParam(Param.ID) String id);
@GET
@Path("/" + Param.COUNT)
int count();
@POST
T save(T entity);
@DELETE
void delete(T entity);
}
@Path(ApiPaths.GAME)
@Produces(MediaType.APPLICATION_JSON)
public interface GameResource extends BaseResource<Game> {
@Path("/{" + Param.GAME_ID + "}" + ApiPaths.CHANCE)
@GET
ChanceResource getChanceResource(@PathParam(Param.GAME_ID) String gameId);
}
@Produces(MediaType.APPLICATION_JSON)
public interface ChanceResource extends BaseResource<Chance> {
}
Any suggestions?