{"record":{"id":"34719da2c8ce6cbf","repo":"hibernate/hibernate-orm","slug":"no-fetch-profile-named-34719d","errorCode":null,"errorMessage":"No fetch profile named '{}'","messagePattern":"No fetch profile named '(.+?)'","errorType":"exception","errorClass":"UnknownProfileException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/MultiIdentifierLoadAccessImpl.java","lineNumber":211,"sourceCode":"\t\t\t\tenabledFetchProfiles,\n\t\t\t\tdisabledFetchProfiles,\n\t\t\t\t// irrelevant for load-by-id\n\t\t\t\tNaturalIdSynchronization.DISABLED\n\t\t);\n\t}\n\n\t@Override\n\t@SuppressWarnings( \"unchecked\" )\n\tpublic <K> List<T> multiLoad(List<K> ids) {\n\t\treturn ids.isEmpty()\n\t\t\t\t? emptyList()\n\t\t\t\t: buildOperation().performFind( (List<Object>)ids, graphSemantic, rootGraph );\n\t}\n\n\t@Override\n\tpublic MultiIdentifierLoadAccess<T> enableFetchProfile(String profileName) {\n\t\tif ( !session.getFactory().containsFetchProfileDefinition( profileName ) ) {\n\t\t\tthrow new UnknownProfileException( profileName );\n\t\t}\n\t\tif ( enabledFetchProfiles == null ) {\n\t\t\tenabledFetchProfiles = new HashSet<>();\n\t\t}\n\t\tenabledFetchProfiles.add( profileName );\n\t\tif ( disabledFetchProfiles != null ) {\n\t\t\tdisabledFetchProfiles.remove( profileName );\n\t\t}\n\t\treturn this;\n\t}\n\n\t@Override\n\tpublic MultiIdentifierLoadAccess<T> disableFetchProfile(String profileName) {\n\t\tif ( disabledFetchProfiles == null ) {\n\t\t\tdisabledFetchProfiles = new HashSet<>();\n\t\t}\n\t\tdisabledFetchProfiles.add( profileName );\n\t\tif ( enabledFetchProfiles != null ) {","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/MultiIdentifierLoadAccessImpl.java#L193-L229","documentation":"Error \"No fetch profile named '{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when enabling a fetch profile that was never declared with @FetchProfile on the SessionFactory.","commonSituations":"Typical situations: misspelled profile name; the @FetchProfile annotation missing or on an entity not scanned; calling enableFetchProfile with a profile defined in another persistence unit.","solutions":["Define the fetch profile with @FetchProfile, or fix the profile name.","Or remove the enableFetchProfile call."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}