hibernate/hibernate-orm · error · AttributeExtractionException
Attribute (field) {} is not accessible
Error message
Attribute (field) {} is not accessible What it means
Error "Attribute (field) {} is not accessible" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java:253
private final String name;
private final Field field;
public FieldAttributeAccess(Field field) {
this.name = field.getName();
try {
ReflectHelper.ensureAccessibility( field );
}
catch (Exception e) {
this.field = null;
return;
}
this.field = field;
}
@Override
public Object extractValue(Object owner) {
if ( field == null ) {
throw new AttributeExtractionException( "Attribute (field) " + name + " is not accessible" );
}
try {
return field.get( owner );
}
catch ( IllegalAccessException e ) {
throw new AttributeExtractionException(
"Unable to access attribute (field): " + field.getDeclaringClass().getName() + "#" + name,
e
);
}
}
}
public static class MethodAttributeAccess implements AttributeAccess {
private final String name;
private final Method method;
View on GitHub (pinned to fad1729dce)
Solutions
- Make the field accessible (non-private or add getter), or configure access via property instead of field.
- Adjust the module/security settings if running under a SecurityManager or JPMS.
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java:253 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/df06de0027bd1c9a.
Report an issue: GitHub.