quarkusio/quarkus · error · ConfigurationException

Unable to interpret path referenced in '" + RedisConfig.getP

Error message

Unable to interpret path referenced in '" + RedisConfig.getPropertyName(name, "redis-load-script") + "=" + String.join(",", importFiles) + "': " + e.getMessage()

What it means

At deployment, the Redis client extension resolves each file listed in quarkus.redis.<name>.redis-load-script against the application root archive. If getChildPath throws a RuntimeException (malformed/invalid path expression), preloadRedisData wraps it in a ConfigurationException saying the path cannot be interpreted.

Source

Thrown at extensions/redis-client/deployment/src/main/java/io/quarkus/redis/deployment/client/RedisClientProcessor.java:263

        } else {
            configurator.addQualifier().annotation(REDIS_CLIENT_ANNOTATION).addValue("value", name).done();
        }

        return configurator.done();
    }

    private void preloadRedisData(String name, RedisClientBuildTimeConfig clientConfig,
            ApplicationArchivesBuildItem applicationArchivesBuildItem,
            LaunchMode launchMode, BuildProducer<NativeImageResourceBuildItem> nativeImageResources,
            BuildProducer<HotDeploymentWatchedFileBuildItem> hotDeploymentWatchedFiles, RedisClientRecorder recorder) {
        List<String> importFiles = getRedisLoadScript(clientConfig, launchMode);
        List<String> paths = new ArrayList<>();
        for (String importFile : importFiles) {
            Path loadScriptPath;
            try {
                loadScriptPath = applicationArchivesBuildItem.getRootArchive().getChildPath(importFile);
            } catch (RuntimeException e) {
                throw new ConfigurationException(
                        "Unable to interpret path referenced in '"
                                + RedisConfig.getPropertyName(name, "redis-load-script") + "="
                                + String.join(",", importFiles)
                                + "': " + e.getMessage());
            }

            if (loadScriptPath != null && !Files.isDirectory(loadScriptPath)) {
                // enlist resource if present
                nativeImageResources.produce(new NativeImageResourceBuildItem(importFile));
            } else if (clientConfig != null && clientConfig.loadScript().isPresent()) {
                //raise exception if explicit file is not present (i.e. not the default)
                throw new ConfigurationException(
                        "Unable to find file referenced in '"
                                + RedisConfig.getPropertyName(name, "redis-load-script") + "="
                                + String.join(", ", clientConfig.loadScript().get())
                                + "'. Remove property or add file to your path.");
            }
            // in dev mode we want to make sure that we watch for changes to file even if it doesn't currently exist

View on GitHub (pinned to e1c734241f)

Solutions

  1. Fix the property to a valid archive-relative path, e.g. quarkus.redis.default.redis-load-script=redis/load.script, with the file under src/main/resources
  2. Remove any absolute path or 'classpath:'/'file:' prefixes — only relative archive paths are supported
  3. Verify the resource directory is included in the build (not filtered out by Maven resource excludes)
  4. Run in dev mode to get faster feedback and confirm the file is visible in target/classes

Example fix

// before
quarkus.redis.default.redis-load-script=file:/opt/data/init.redis
// after
quarkus.redis.default.redis-load-script=redis/init.script  # src/main/resources/redis/init.script
Defensive patterns

Strategy: validation

Validate before calling

Path p = Path.of(configuredValue);
if (p.isAbsolute() || configuredValue.startsWith("classpath:") || configuredValue.startsWith("file:"))
    throw new IllegalStateException("redis-load-script must be an archive-relative path");

Prevention

When it happens

Trigger: Setting quarkus.redis.<name>.redis-load-script to a path the application archive cannot resolve, e.g. with invalid characters, absolute paths outside the archive, or malformed multi-value syntax.

Common situations: Using an absolute filesystem path or classpath: URL prefix instead of an archive-relative path; typos like 'file:/data/init.redis'; CI environments where the resource directory isn't packaged into the app archive.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/940023e9e12f6702. Report an issue: GitHub.