diff --git a/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java b/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java index ed6605aa3fbeb..31af96b46ca9e 100644 --- a/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java +++ b/extensions/resteasy-classic/resteasy-server-common/deployment/src/main/java/io/quarkus/resteasy/server/common/deployment/ResteasyServerCommonProcessor.java @@ -240,7 +240,9 @@ public void build( jaxrsProvidersToRegisterBuildItem = getFilteredJaxrsProvidersToRegisterBuildItem( jaxrsProvidersToRegisterBuildItem, allowedClasses, excludedClasses); - Collection knownApplications = index.getAllKnownSubclasses(ResteasyDotNames.APPLICATION); + Collection knownApplications = index.getAllKnownSubclasses(ResteasyDotNames.APPLICATION).stream() + .filter(ci -> !ci.isAbstract()).collect( + Collectors.toSet()); // getAllowedClasses throws an Exception if multiple Applications are found, so we should only get 1 if (knownApplications.size() == 1) { appClass = knownApplications.iterator().next().name().toString(); diff --git a/extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/root/ApplicationTest.java b/extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/root/ApplicationTest.java index eb5c2ad1879d0..22646dea2e296 100644 --- a/extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/root/ApplicationTest.java +++ b/extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/root/ApplicationTest.java @@ -42,7 +42,7 @@ class ApplicationTest { ResponseFilter1.class, ResponseFilter2.class, ResponseFilter3.class, ResponseFilter4.class, ResponseFilter5.class, ResponseFilter6.class, Feature1.class, Feature2.class, DynamicFeature1.class, DynamicFeature2.class, - ExceptionMapper1.class, ExceptionMapper2.class, AppTest.class)); + ExceptionMapper1.class, ExceptionMapper2.class, AppTest.class, AppTest2.class)); @DisplayName("Should access to ok of resource 1 and provide a response with the expected headers") @Test @@ -309,4 +309,8 @@ public Set getSingletons() { new ResponseFilter1(), new DynamicFeature1())); } } + + public static abstract class AppTest2 extends Application { + + } }