{"record":{"id":"fa75ad6c5fa0187c","repo":"hibernate/hibernate-orm","slug":"null-property-name","errorCode":null,"errorMessage":"Null property name","messagePattern":"Null property name","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java","lineNumber":440,"sourceCode":"\t\t// returned map should be a mutable copy,\n\t\t// not an unmodifiable map. There's no\n\t\t// good reason to cache the initial\n\t\t// properties, since we have to copy them\n\t\t// each time this method is called.\n\t\treturn properties == null\n\t\t\t\t? getInitialProperties()\n\t\t\t\t: new HashMap<>( properties );\n\t}\n\n\t@Nonnull\n\tprotected abstract Map<String, Object> getInitialProperties();\n\n\t@Override\n\tpublic void setProperty(@Nonnull String propertyName, @Nullable Object value) {\n\t\tcheckOpen();\n\t\t//noinspection ConstantValue\n\t\tif ( propertyName == null ) {\n\t\t\tthrow new IllegalArgumentException( \"Null property name\" );\n\t\t}\n\t\telse if ( value != null && !(value instanceof Serializable) ) {\n\t\t\tSESSION_LOGGER.nonSerializableProperty( propertyName );\n\t\t}\n\t\telse {\n\t\t\t// the first time we explicitly set a\n\t\t\t// property, it's worth caching the\n\t\t\t// initial properties\n\t\t\tfinal Map<String, Object> properties;\n\t\t\tif ( this.properties == null ) {\n\t\t\t\tproperties = getInitialProperties();\n\t\t\t\tthis.properties = properties;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tproperties = this.properties;\n\t\t\t}\n\t\t\tif ( value == null ) {\n\t\t\t\tproperties.remove( propertyName );","sourceCodeStart":422,"sourceCodeEnd":458,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java#L422-L458","documentation":"Error \"Null property name\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when a null property name is passed to an API requiring one.","commonSituations":"Typical situations: passing a null or uninitialized property name string to a session/query method.","solutions":["Pass a non-null property name to the session operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}