hibernate/hibernate-orm · error · IllegalArgumentException
Null property name
Error message
Null property name
What it means
Error "Null property name" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java:440
// returned map should be a mutable copy,
// not an unmodifiable map. There's no
// good reason to cache the initial
// properties, since we have to copy them
// each time this method is called.
return properties == null
? getInitialProperties()
: new HashMap<>( properties );
}
@Nonnull
protected abstract Map<String, Object> getInitialProperties();
@Override
public void setProperty(@Nonnull String propertyName, @Nullable Object value) {
checkOpen();
//noinspection ConstantValue
if ( propertyName == null ) {
throw new IllegalArgumentException( "Null property name" );
}
else if ( value != null && !(value instanceof Serializable) ) {
SESSION_LOGGER.nonSerializableProperty( propertyName );
}
else {
// the first time we explicitly set a
// property, it's worth caching the
// initial properties
final Map<String, Object> properties;
if ( this.properties == null ) {
properties = getInitialProperties();
this.properties = properties;
}
else {
properties = this.properties;
}
if ( value == null ) {
properties.remove( propertyName );View on GitHub (pinned to fad1729dce)
Solutions
- Pass a non-null property name to the session operation.
When it happens
Trigger: Thrown when a null property name is passed to an API requiring one.
Common situations: Typical situations: passing a null or uninitialized property name string to a session/query method.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/fa75ad6c5fa0187c.
Report an issue: GitHub.