quarkusio/quarkus · error · IllegalStateException

No PropertiesRealmConfig users/roles settings found. Configu

Error message

No PropertiesRealmConfig users/roles settings found. Configure the quarkus.security.file.%s properties

What it means

The properties-file Elytron realm loads users and roles from property files. At startup, the recorder resolves the configured users/roles files; if neither is found (both null), there is nothing to load and it throws an IllegalStateException telling you to configure the properties realm file settings.

Source

Thrown at extensions/elytron-security-properties-file/runtime/src/main/java/io/quarkus/elytron/security/properties/runtime/ElytronPropertiesFileRecorder.java:96

                        users = p.toUri().toURL();
                    } else {
                        users = Thread.currentThread().getContextClassLoader().getResource(config.users());
                    }
                    log.debugf("users: %s", users);
                    log.debugf("Trying to loader roles: %s", config.roles());
                    URL roles;
                    p = Paths.get(config.roles());
                    if (Files.exists(p)) {
                        roles = p.toUri().toURL();
                    } else {
                        roles = Thread.currentThread().getContextClassLoader().getResource(config.roles());
                    }
                    log.debugf("roles: %s", roles);
                    if (users == null && roles == null) {
                        String msg = String.format(
                                "No PropertiesRealmConfig users/roles settings found. Configure the quarkus.security.file.%s properties",
                                PropertiesRealmConfig.help());
                        throw new IllegalStateException(msg);
                    }
                    ClassPathUtils.consumeStream(users, usersStream -> {
                        try {
                            ClassPathUtils.consumeStream(roles, rolesStream -> {
                                try {
                                    propsRealm.load(usersStream, rolesStream);
                                } catch (IOException e) {
                                    throw new UncheckedIOException(e);
                                }
                            });
                        } catch (IOException e) {
                            throw new UncheckedIOException(e);
                        }
                    });
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set quarkus.elytron.security.properties-file.users and .roles to valid classpath file locations
  2. Add the users/roles .properties files under src/main/resources
  3. Check for typos in config keys and that files are packaged (not filtered out) in the jar
  4. If the properties realm is unused, remove the quarkus-elytron-security-properties-file dependency

Example fix

// before
# no properties-file config
// after
quarkus.elytron.security.properties-file.users=users.properties
quarkus.elytron.security.properties-file.roles=roles.properties
Defensive patterns

Strategy: validation

Validate before calling

if (getClass().getResourceAsStream("/users.properties") == null
        && getClass().getResourceAsStream("/roles.properties") == null) {
    throw new IllegalStateException("users/roles properties files missing from classpath");
}

Prevention

When it happens

Trigger: quarkus.elytron.security.properties-file.users and .roles are both unset or point at non-existent/unresolvable classpath locations when the realm is initialized.

Common situations: Missing users.properties/roles.properties files in src/main/resources; wrong file paths; typos in the quarkus.elytron.security.properties-file.* keys; files excluded from the built artifact.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


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