{"record":{"id":"7ec9441398229915","repo":"hibernate/hibernate-orm","slug":"no-entitygraph-with-given-name","errorCode":null,"errorMessage":"No EntityGraph with given name '{}'","messagePattern":"No EntityGraph with given name '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java","lineNumber":2475,"sourceCode":"\t\tfinal var entityGraph = createEntityGraph( graphName );\n\t\treturn entityGraph == null ? null : castEntityGraph( rootType, graphName, entityGraph );\n\t}\n\n\t@Override @Deprecated\n\t@Nullable\n\tpublic RootGraphImplementor<?> createEntityGraph(@Nonnull String graphName) {\n\t\tcheckOpen();\n\t\tfinal var named = getFactory().findEntityGraphByName( graphName );\n\t\treturn named == null ? null : named.makeCopy( true );\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic RootGraphImplementor<?> getEntityGraph(@Nonnull String graphName) {\n\t\tcheckOpen();\n\t\tfinal var named = getFactory().findEntityGraphByName( graphName );\n\t\tif ( named == null ) {\n\t\t\tthrow new IllegalArgumentException( \"No EntityGraph with given name '\" + graphName + \"'\" );\n\t\t}\n\t\t//TODO: we're using the deprecated operation\n\t\t//      here to preserve the graph name\n\t\treturn named.makeCopy(true, graphName );\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic <T> List<EntityGraph<? super T>> getEntityGraphs(@Nonnull Class<T> entityClass) {\n\t\tcheckOpen();\n\t\treturn getFactory().findEntityGraphsByType( entityClass );\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic ExceptionConverter getExceptionConverter() {\n\t\tif ( exceptionConverter == null ) {\n\t\t\texceptionConverter = new ExceptionConverterImpl( this );","sourceCodeStart":2457,"sourceCodeEnd":2493,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java#L2457-L2493","documentation":"Error \"No EntityGraph with given name '{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when looking up a named EntityGraph that is not defined for the persistence unit.","commonSituations":"Typical situations: misspelled graph name; missing @NamedEntityGraph on the entity; using a graph defined for a different entity.","solutions":["Define the named EntityGraph via @NamedEntityGraph or add it programmatically before use.","Check the graph name for typos."],"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"}