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
- Set quarkus.elytron.security.properties-file.users and .roles to valid classpath file locations
- Add the users/roles .properties files under src/main/resources
- Check for typos in config keys and that files are packaged (not filtered out) in the jar
- 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
- Add users.properties/roles.properties to src/main/resources
- Verify files are packaged in the jar (mvn dependency/inspect the artifact)
- Set quarkus.elytron.security.properties-file.users and .roles explicitly
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
- Could not obtain credential
- Could not obtain principal
- Unable to register password for user:${user} make sure it is
- No producers for required item %s, step builder used: %s
- cycle detection failure report (dynamic CycleBuildException
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f0344b52cc15125a.
Report an issue: GitHub.