quarkusio/quarkus · error · RuntimeException

Not implemented yet

Error message

Not implemented yet

What it means

RestDataResource is an interface whose default methods throw RuntimeException("Not implemented yet") as placeholders. Quarkus REST Data Panache generates an implementing resource at build time; if code reaches the default body it means the method was invoked on a resource instance that was never intercepted/generated (e.g. called directly on the interface or CDI could not apply the generated implementation).

Source

Thrown at extensions/panache/rest-data-panache/runtime/src/main/java/io/quarkus/rest/data/panache/RestDataResource.java:29

 * <p>
 * User shouldn't use this interface directly but rather its sub-interfaces defined by the data store specific extensions.
 *
 * @param <Entity> Entity type that is handled by this resource.
 * @param <ID> ID type of the entity.
 */
public interface RestDataResource<Entity, ID> {

    /**
     * Return entities as a JSON array.
     * The response is paged by default, but that could be disabled with {@link ResourceProperties} annotation.
     * Response content type: application/json.
     *
     * @param page Panache page instance that should be used in a query. Will be null if pagination is disabled.
     * @param sort Panache sort instance that should be used in a query.
     * @return A response with an entities JSON array.
     */
    default List<Entity> list(Page page, Sort sort) {
        throw new RuntimeException("Not implemented yet");
    }

    /**
     * @return the total number of entities.
     */
    default long count() {
        throw new RuntimeException("Not implemented yet");
    }

    /**
     * Return an entity as a JSON object.
     * Response content type: application/json.
     *
     * @param id Entity identifier.
     * @return A response with a JSON object representing an entity.
     */
    default Entity get(ID id) {
        throw new RuntimeException("Not implemented yet");

View on GitHub (pinned to e1c734241f)

Solutions

  1. Override the list(Page page, Sort sort) method in your resource implementation/customization with real logic
  2. Ensure the resource is generated: put @Path-less RestDataResource implementation in place and confirm the REST Data Panache extension processed it (check build logs for the generated resource)
  3. Do not call the default interface methods directly; use the generated JAX-RS resource endpoint instead

Example fix

// before
public class PeopleResource implements RestDataResource<Person> {
    // list not overridden -> default throws
}
// after
public class PeopleResource implements RestDataResource<Person> {
    @Override
    public List<Person> list(Page page, Sort sort) {
        return Person.listAll(page, sort);
    }
}
Defensive patterns

Strategy: validation

Validate before calling

if (this.getClass().isAssignableFrom(RestDataResource.class) && this.getClass().isInterface()) {
    throw new IllegalStateException("list() must be overridden or generated; default throws");
}

Type guard

static boolean isImplemented(RestDataResource<?> r) {
    try {
        r.getClass().getDeclaredMethod("list", Object.class);
        return true;
    } catch (NoSuchMethodException e) {
        return false;
    }
}

Try / catch

try {
    List<Person> people = resource.list(page, sort);
} catch (RuntimeException e) {
    if ("Not implemented yet".equals(e.getMessage())) {
        throw new IllegalStateException("Resource not generated/overridden: implement list(Page, Sort)", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling list(Page, Sort) on a RestDataResource instance that was not the generated resource — e.g. injecting the raw interface without proper Panache entity/repository setup, or invoking the method manually on an anonymous/manual implementation that forgot to override list().

Common situations: Manually implementing RestDataResource and overriding some methods but not list(); injecting RestDataResource without annotating the entity/resource correctly so the generated resource is not used; customizing a generated resource by re-declaring methods but leaving list to the default.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/598adbb76ed960e2. Report an issue: GitHub.