{"id":"a8c651aff3e28fbc","repo":"spring-projects/spring-framework","slug":"either-requiredtype-or-propertypath-is-required","errorCode":null,"errorMessage":"Either requiredType or propertyPath is required","messagePattern":"Either requiredType or propertyPath is required","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java","lineNumber":308,"sourceCode":"\t\ttarget.configValueEditorsActive = this.configValueEditorsActive;\n\t\ttarget.defaultEditors = this.defaultEditors;\n\t\ttarget.overriddenDefaultEditors = this.overriddenDefaultEditors;\n\t}\n\n\n\t//---------------------------------------------------------------------\n\t// Management of custom editors\n\t//---------------------------------------------------------------------\n\n\t@Override\n\tpublic void registerCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor) {\n\t\tregisterCustomEditor(requiredType, null, propertyEditor);\n\t}\n\n\t@Override\n\tpublic void registerCustomEditor(@Nullable Class<?> requiredType, @Nullable String propertyPath, PropertyEditor propertyEditor) {\n\t\tif (requiredType == null && propertyPath == null) {\n\t\t\tthrow new IllegalArgumentException(\"Either requiredType or propertyPath is required\");\n\t\t}\n\t\tif (propertyPath != null) {\n\t\t\tif (this.customEditorsForPath == null) {\n\t\t\t\tthis.customEditorsForPath = new LinkedHashMap<>(16);\n\t\t\t}\n\t\t\tthis.customEditorsForPath.put(propertyPath, new CustomEditorHolder(propertyEditor, requiredType));\n\t\t}\n\t\telse {\n\t\t\tif (this.customEditors == null) {\n\t\t\t\tthis.customEditors = new LinkedHashMap<>(16);\n\t\t\t}\n\t\t\tthis.customEditors.put(requiredType, propertyEditor);\n\t\t\tthis.customEditorCache = null;\n\t\t}\n\t}\n\n\t@Override\n\tpublic @Nullable PropertyEditor findCustomEditor(@Nullable Class<?> requiredType, @Nullable String propertyPath) {","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/spring-projects/spring-framework/blob/e8729d043887bf0d0baf91e062e909b56eb2b708/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java#L290-L326","documentation":"Error \"Either requiredType or propertyPath is required\" thrown in spring-projects/spring-framework.","triggerScenarios":"Thrown at spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java:308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e8729d043887bf0d0baf91e062e909b56eb2b708","analyzedAt":"2026-08-04T19:07:39.725Z","schemaVersion":2}