{"record":{"id":"9a88f669d26d1326","repo":"theonedev/onedev","slug":"no-property-found-with-name-propertynameordispl","errorCode":null,"errorMessage":"No property found with name: ${propertyNameOrDisplayName}","messagePattern":"No property found with name: (.+?)","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/web/editable/BeanDescriptor.java","lineNumber":116,"sourceCode":"\t\t} catch (InstantiationException | IllegalAccessException | IllegalArgumentException \n\t\t\t\t| InvocationTargetException | NoSuchMethodException | SecurityException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n\t\n\tpublic boolean isPropertyVisible(String propertyNameOrDisplayName) {\n\t\treturn getProperty(propertyNameOrDisplayName).isPropertyVisible(new HashMap<>(), this);\n\t}\n\n\tpublic String getPropertyName(String propertyNameOrDisplayName) {\n\t\tfor (List<PropertyDescriptor> groupProperties: properties.values()) {\n\t\t\tfor (PropertyDescriptor property: groupProperties) {\n\t\t\t\tString displayName = property.getDisplayName();\n\t\t\t\tif (property.getPropertyName().equals(propertyNameOrDisplayName) || displayName.equals(propertyNameOrDisplayName))\n\t\t\t\t\treturn property.getPropertyName();\n\t\t\t}\n\t\t}\n\t\tthrow new ExplicitException(\"No property found with name: \" + propertyNameOrDisplayName);\n\t}\n\t\n}\n","sourceCodeStart":98,"sourceCodeEnd":120,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/editable/BeanDescriptor.java#L98-L120","documentation":"BeanDescriptor.getPropertyName resolves a property name given either the actual property name or its display name, by scanning the descriptor's property groups. When neither matches any property of the bean, it throws this ExplicitException. It is used by editable-form machinery to translate user-facing names into bean property names.","triggerScenarios":"Calling BeanDescriptor.getPropertyName(name) (directly or via APIs that accept a property name/display name, e.g. field ordering or scripting helpers) with a string that matches neither PropertyDescriptor.getPropertyName() nor getDisplayName() of any property in the bean class.","commonSituations":"Typo in a property name in configuration or script; using the display name after it was renamed in an @Editable annotation; referencing a property that exists on a different bean class; version upgrade renamed a field.","solutions":["Print/inspect the bean's properties (e.g. via new BeanDescriptor(beanClass).getProperties()) and use the exact property name.","If using a display name, confirm the @Editable(name=...) value matches exactly (case-sensitive equals).","Fix typos or update the reference after a rename/upgrade.","Check you are resolving against the correct bean class."],"exampleFix":"// before\nString prop = new BeanDescriptor(BuildSpec.class).getPropertyName(\"Cpu\");\n// after\nString prop = new BeanDescriptor(BuildSpec.class).getPropertyName(\"cpu\"); // exact property name or exact display name","handlingStrategy":"validation","validationCode":"BeanDescriptor desc = new BeanDescriptor(MyBean.class);\nboolean exists = desc.getProperties().stream().anyMatch(p ->\n    p.getPropertyName().equals(name) || p.getDisplayName().equals(name));\nif (!exists) throw new IllegalArgumentException(\"Unknown property: \" + name);","typeGuard":null,"tryCatchPattern":"try {\n    String prop = beanDescriptor.getPropertyName(name);\n} catch (ExplicitException e) {\n    log.error(\"Property '{}' not found on {}; available: {}\", name,\n        beanClass, availablePropertyNames, e);\n}","preventionTips":["Always reference properties by programmatic name, not display name; display names change across versions.","List the bean's properties once during development to copy exact names.","After renaming a property, grep for the old name in configs/scripts/annotations.","Keep property name strings in constants shared with the bean definition where possible."],"tags":["reflection","beans","property-not-found","onedev"],"backgroundTag":"record-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}