{"record":{"id":"758032802c8790fb","repo":"quarkusio/quarkus","slug":"unable-to-create-resolver","errorCode":null,"errorMessage":"Unable to create resolver: ","messagePattern":"Unable to create resolver: ","errorType":"exception","errorClass":"java.lang.IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/EngineProducer.java","lineNumber":369,"sourceCode":"        return engine;\n    }\n\n    void onShutdown(@Observes ShutdownEvent event) {\n        // Make sure to clear the Qute cache\n        Qute.clearCache();\n    }\n\n    private Resolver createResolver(String resolverClassName) {\n        try {\n            Class<?> resolverClazz = Thread.currentThread()\n                    .getContextClassLoader().loadClass(resolverClassName);\n            if (Resolver.class.isAssignableFrom(resolverClazz)) {\n                return (Resolver) resolverClazz.getDeclaredConstructor().newInstance();\n            }\n            throw new IllegalStateException(\"Not a resolver: \" + resolverClassName);\n        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | IllegalArgumentException\n                | InvocationTargetException | NoSuchMethodException | SecurityException e) {\n            throw new IllegalStateException(\"Unable to create resolver: \" + resolverClassName, e);\n        }\n    }\n\n    private TemplateGlobalProvider createGlobalProvider(String initializerClassName) {\n        try {\n            Class<?> initializerClazz = Thread.currentThread()\n                    .getContextClassLoader().loadClass(initializerClassName);\n            if (TemplateGlobalProvider.class.isAssignableFrom(initializerClazz)) {\n                return (TemplateGlobalProvider) initializerClazz.getDeclaredConstructor().newInstance();\n            }\n            throw new IllegalStateException(\"Not a global provider: \" + initializerClazz);\n        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | IllegalArgumentException\n                | InvocationTargetException | NoSuchMethodException | SecurityException e) {\n            throw new IllegalStateException(\"Unable to create global provider: \" + initializerClassName, e);\n        }\n    }\n\n    private boolean isExcluded(String path) {","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/EngineProducer.java#L351-L387","documentation":"EngineProducer.createResolver wraps all reflective instantiation failures (ClassNotFoundException, InstantiationException, NoSuchMethodException, SecurityException, etc.) into this IllegalStateException while creating a resolver configured via quarkus.qute.resolver.*.classes. The original exception is attached as the cause.","triggerScenarios":"A quarkus.qute.resolver.<n>.classes value names a class that is missing from the classpath, is abstract/an interface, lacks a public no-arg constructor, or whose constructor throws.","commonSituations":"Typo in the fully-qualified class name; the class lives in a module/extension not included in the build; constructor dependency missing at runtime; native-image build missed reflection registration for the class.","solutions":["Read the chained cause (ClassNotFoundException vs NoSuchMethodException vs constructor exception) to identify the exact failure.","Correct the fully-qualified class name in quarkus.qute.resolver.<n>.classes.","Ensure the class has a public no-arg constructor and its dependencies are on the runtime classpath.","For native builds, verify reflection registers the class (or that it is reachable via Quarkus config-driven registration)."],"exampleFix":"// before\nquarkus.qute.resolver.x.classes=com.example.MyResolvr // typo\n// after\nquarkus.qute.resolver.x.classes=com.example.MyResolver","handlingStrategy":"validation","validationCode":"try { Class.forName(\"com.example.MyResolver\", true, Thread.currentThread().getContextClassLoader()); } catch (ClassNotFoundException e) { throw new IllegalStateException(\"Resolver class not on classpath\", e); }","typeGuard":null,"tryCatchPattern":"try { app.start(); } catch (IllegalStateException e) { if (e.getMessage().startsWith(\"Unable to create resolver\")) { log.error(\"Check cause\", e.getCause()); } else throw e; }","preventionTips":["Ensure the resolver module/dependency is included in the build","Provide a public no-arg constructor","For native builds, verify reflection configuration"],"tags":["qute","reflection","configuration","classpath"],"backgroundTag":"reflective-instantiation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}