diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java index c524d72d11c..a8f2503715d 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendDependencies.java @@ -457,14 +457,19 @@ private void computePwaConfiguration() throws ClassNotFoundException { .getAnnotatedClasses(PWA.class.getName())) { if (!Arrays.asList(hopefullyAppShellClass.getInterfaces()) .contains(appShellConfiguratorClass)) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " " + hopefullyAppShellClass.getName() + + " does not implement " + + AppShellConfigurator.class.getSimpleName()); } pwaVisitor.visitClass(hopefullyAppShellClass.getName()); } Set dependencies = pwaVisitor.getValues("name"); if (dependencies.size() > 1) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " Found " + dependencies.size() + " implementations: " + + dependencies); } if (dependencies.isEmpty()) { this.pwaConfiguration = new PwaConfiguration(useV14Bootstrap); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java index 26c7f32bab3..4256f253b00 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FullDependenciesScanner.java @@ -492,7 +492,9 @@ private PwaConfiguration discoverPwa() { if (annotatedClasses.isEmpty()) { return new PwaConfiguration(useV14Bootstrap); } else if (annotatedClasses.size() != 1) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " Found " + annotatedClasses.size() + + " implementations: " + annotatedClasses); } Class hopefullyAppShellClass = annotatedClasses.iterator() @@ -501,7 +503,10 @@ private PwaConfiguration discoverPwa() { && !Arrays.stream(hopefullyAppShellClass.getInterfaces()) .map(Class::getName).collect(Collectors.toList()) .contains(AppShellConfigurator.class.getName())) { - throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION); + throw new IllegalStateException(ERROR_INVALID_PWA_ANNOTATION + + " " + hopefullyAppShellClass.getName() + + " does not implement " + + AppShellConfigurator.class.getSimpleName()); } Annotation pwa = annotationFinder