{"record":{"id":"bce74f95a75f7822","repo":"quarkusio/quarkus","slug":"unable-to-interpret-path-referenced-in-pupropert","errorCode":null,"errorMessage":"Unable to interpret path referenced in '<puPropertyKey(persistenceUnitName, \"sql-load-script\")>=<sqlLoadScript>': <e.getMessage()>","messagePattern":"Unable to interpret path referenced in '<puPropertyKey\\(persistenceUnitName, \"sql-load-script\"\\)>=<sqlLoadScript>': <e\\.getMessage\\(\\)>","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/util/HibernateProcessorSupport.java","lineNumber":489,"sourceCode":"\n    public static void configureSqlLoadScript(String persistenceUnitName,\n            HibernateOrmConfigPersistenceUnit persistenceUnitConfig,\n            ApplicationArchivesBuildItem applicationArchivesBuildItem, LaunchMode launchMode,\n            List<SqlLoadScriptDefaultBuildItem> additionalSqlLoadScriptDefaults,\n            BuildProducer<NativeImageResourceBuildItem> nativeImageResources,\n            BuildProducer<HotDeploymentWatchedFileBuildItem> hotDeploymentWatchedFiles,\n            QuarkusPersistenceUnitDescriptor descriptor) {\n        // This defaults to 'import.sql', and potentially 'data.sql', in non-production modes\n        List<String> importFiles = getSqlLoadScript(persistenceUnitConfig.sqlLoadScript(),\n                launchMode, persistenceUnitName, additionalSqlLoadScriptDefaults);\n        if (!importFiles.isEmpty()) {\n            List<String> existingImportFiles = new ArrayList<>();\n            for (String importFile : importFiles) {\n                Path loadScriptPath;\n                try {\n                    loadScriptPath = applicationArchivesBuildItem.getRootArchive().getChildPath(importFile);\n                } catch (RuntimeException e) {\n                    throw new ConfigurationException(\n                            \"Unable to interpret path referenced in '\"\n                                    + HibernateOrmRuntimeConfig.puPropertyKey(persistenceUnitName, \"sql-load-script\") + \"=\"\n                                    + String.join(\",\", persistenceUnitConfig.sqlLoadScript().get())\n                                    + \"': \" + e.getMessage());\n                }\n\n                if (loadScriptPath != null && !Files.isDirectory(loadScriptPath)) {\n                    // enlist resource if present\n                    existingImportFiles.add(importFile);\n                    nativeImageResources.produce(new NativeImageResourceBuildItem(importFile));\n                } else if (persistenceUnitConfig.sqlLoadScript().isPresent()) {\n                    //raise exception if explicit file is not present (i.e. not the default)\n                    throw new ConfigurationException(\n                            \"Unable to find file referenced in '\"\n                                    + HibernateOrmRuntimeConfig.puPropertyKey(persistenceUnitName, \"sql-load-script\") + \"=\"\n                                    + String.join(\",\", persistenceUnitConfig.sqlLoadScript().get())\n                                    + \"'. Remove property or add file to your path.\");\n                }","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/util/HibernateProcessorSupport.java#L471-L507","documentation":"The SQL load script configured via quarkus.hibernate-orm.\"<pu>\".sql-load-script is resolved against the application root archive. If resolving the path throws a RuntimeException, configureSqlLoadScript wraps it into a ConfigurationException that echoes the property key, the configured value(s), and the underlying error message.","triggerScenarios":"configureSqlLoadScript calls getRootArchive().getChildPath(importFile) for each sql-load-script entry and the archive throws while interpreting the path (malformed path expression).","commonSituations":"Absolute paths or URLs in sql-load-script; paths with unsupported characters or double slashes; referencing files outside the application archive; typos like 'file:/...' protocol prefixes.","solutions":["Use a classpath-relative path that exists in the application (e.g. import.sql in src/main/resources)","Remove absolute paths, URLs, or protocol prefixes from the sql-load-script value","Check the nested e.getMessage() in the error for the exact path problem","Place the script under src/main/resources so it is packaged into the archive"],"exampleFix":"// before\nquarkus.hibernate-orm.sql-load-script=file:/home/me/scripts/import.sql\n// after\nquarkus.hibernate-orm.sql-load-script=import.sql","handlingStrategy":"validation","validationCode":"// Check the script exists at a classpath-relative location before configuring\nvar url = Thread.currentThread().getContextClassLoader().getResource(\"import.sql\");\nif (url == null) throw new IllegalStateException(\"import.sql not found in classpath\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use plain classpath-relative paths in sql-load-script","Never use absolute paths or file: URLs","Keep import scripts in src/main/resources"],"tags":["quarkus","hibernate-orm","sql-load-script","path-resolution"],"backgroundTag":"invalid-resource-path","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}