{"record":{"id":"a002bebaf482f488","repo":"gradle/gradle","slug":"type-s-is-not-managed","errorCode":null,"errorMessage":"Type '%s' is not managed","messagePattern":"Type '(.+?)' is not managed","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/typeregistration/BaseInstanceFactory.java","lineNumber":93,"sourceCode":"            registration = new TypeRegistration<S>(publicType);\n            registrations.put(publicType, registration);\n        }\n        return new TypeRegistrationBuilderImpl<S>(source, registration);\n    }\n\n    @Override @Nullable\n    public <S extends PUBLIC> ImplementationInfo getImplementationInfo(ModelType<S> publicType) {\n        ImplementationRegistration<S> implementationRegistration = getImplementationRegistration(publicType);\n        if (implementationRegistration == null) {\n            return null;\n        }\n        return new ImplementationInfoImpl<S>(publicType, implementationRegistration, getInternalViews(publicType));\n    }\n\n    @Override\n    public <S extends PUBLIC> ImplementationInfo getManagedSubtypeImplementationInfo(final ModelType<S> publicType) {\n        if (!isManaged(publicType)) {\n            throw new IllegalArgumentException(String.format(\"Type '%s' is not managed\", publicType));\n        }\n        final MutableReference<ImplementationInfoImpl<S>> implementationInfo = MutableReference.empty();\n        walkTypeHierarchy(publicType.getConcreteClass(), new RegistrationHierarchyVisitor<S>() {\n            @Override\n            protected void visitRegistration(TypeRegistration<? extends PUBLIC> registration) {\n                if (registration == null || registration.implementationRegistration == null) {\n                    return;\n                }\n                ImplementationInfoImpl<S> currentImplementationInfo = implementationInfo.get();\n                if (currentImplementationInfo == null || currentImplementationInfo.implementationRegistration.getImplementationType().isAssignableFrom(registration.implementationRegistration.getImplementationType())) {\n                    implementationInfo.set(new ImplementationInfoImpl<S>(publicType, registration.implementationRegistration, getInternalViews(publicType)));\n                }\n            }\n        });\n\n        if (implementationInfo.get() == null) {\n            throw new IllegalStateException(String.format(\"Factory registration for '%s' is invalid because it doesn't extend an interface with a default implementation\", publicType));\n        }","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/gradle/gradle/blob/534f27719b66953f95cc907aae7f2c1b12f5482d/platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/typeregistration/BaseInstanceFactory.java#L75-L111","documentation":"Error \"Type '%s' is not managed\" thrown in gradle/gradle.","triggerScenarios":"Thrown at platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/typeregistration/BaseInstanceFactory.java:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The type is not a managed type. Annotate the interface with @Managed or use a type registered as managed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"534f27719b66953f95cc907aae7f2c1b12f5482d","analyzedAt":"2026-08-22T08:09:12.375Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}