{"record":{"id":"8241a11b801815a2","repo":"hibernate/hibernate-orm","slug":"resource-not-found","errorCode":null,"errorMessage":"resource + \" not found\"","messagePattern":"resource \\+ \" not found\"","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/util/ConfigHelper.java","lineNumber":123,"sourceCode":"\n\tpublic static InputStream getResourceAsStream(String resource) {\n\t\tfinal String stripped = resource.startsWith( \"/\" )\n\t\t\t\t? resource.substring( 1 )\n\t\t\t\t: resource;\n\n\t\tInputStream stream = null;\n\t\tfinal ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tif ( classLoader != null ) {\n\t\t\tstream = classLoader.getResourceAsStream( stripped );\n\t\t}\n\t\tif ( stream == null ) {\n\t\t\tstream = Environment.class.getResourceAsStream( resource );\n\t\t}\n\t\tif ( stream == null ) {\n\t\t\tstream = Environment.class.getClassLoader().getResourceAsStream( stripped );\n\t\t}\n\t\tif ( stream == null ) {\n\t\t\tthrow new HibernateException( resource + \" not found\" );\n\t\t}\n\t\treturn stream;\n\t}\n\n\n\tpublic static InputStream getUserResourceAsStream(String resource) {\n\t\tboolean hasLeadingSlash = resource.startsWith( \"/\" );\n\t\tfinal String stripped = hasLeadingSlash ? resource.substring( 1 ) : resource;\n\n\t\tInputStream stream = null;\n\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tif ( classLoader != null ) {\n\t\t\tstream = classLoader.getResourceAsStream( resource );\n\t\t\tif ( stream == null && hasLeadingSlash ) {\n\t\t\t\tstream = classLoader.getResourceAsStream( stripped );\n\t\t\t}\n\t\t}","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/util/ConfigHelper.java#L105-L141","documentation":"Error \"resource + \" not found\"\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/internal/util/ConfigHelper.java:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the named resource is on the classpath/filesystem; correct the resource name/path."],"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"}