{"record":{"id":"3f56f3efcc4832d0","repo":"apache/dubbo","slug":"property-not-found","errorCode":null,"errorMessage":"Property [{}] not found.","messagePattern":"Property \\[(.+?)\\] not found\\.","errorType":"exception","errorClass":"NoSuchPropertyException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java","lineNumber":72,"sourceCode":"\n        @Override\n        public String[] getDeclaredMethodNames() {\n            return OBJECT_METHODS;\n        }\n\n        @Override\n        public String[] getPropertyNames() {\n            return EMPTY_STRING_ARRAY;\n        }\n\n        @Override\n        public Class<?> getPropertyType(String pn) {\n            return null;\n        }\n\n        @Override\n        public Object getPropertyValue(Object instance, String pn) throws NoSuchPropertyException {\n            throw new NoSuchPropertyException(\"Property [\" + pn + \"] not found.\");\n        }\n\n        @Override\n        public void setPropertyValue(Object instance, String pn, Object pv) throws NoSuchPropertyException {\n            throw new NoSuchPropertyException(\"Property [\" + pn + \"] not found.\");\n        }\n\n        @Override\n        public boolean hasProperty(String name) {\n            return false;\n        }\n\n        @Override\n        public Object invokeMethod(Object instance, String mn, Class<?>[] types, Object[] args)\n                throws NoSuchMethodException {\n            if (\"getClass\".equals(mn)) {\n                return instance.getClass();\n            }","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java#L54-L90","documentation":"Thrown by the OBJECT_WRAPPER (the singleton Wrapper for java.lang.Object) when getPropertyValue is called. Because Object has no bean properties, any property read on an Object-typed service/argument is rejected. NoSuchPropertyException is a Dubbo-specific RuntimeException indicating the property name does not exist on the wrapped class.","triggerScenarios":"Calling Wrapper.getWrapper(Object.class).getPropertyValue(instance, name), or a Dubbo RPC/generic invocation whose target interface resolves to Object.class and a property accessor is generated/invoked against it.","commonSituations":"A service interface method declares a parameter or return type of Object (or a raw type whose erased superclass is Object), and Dubbo's reflection layer tries to serialize/deserialize or set fields by property name. Also triggered by passing a plain java.lang.Object where a typed POJO was expected.","solutions":["Use a concrete POJO class with getters/setters instead of Object as the service parameter/return type so Wrapper generates a real property accessor.","Verify the service interface method signatures are concrete types; if a generic Object slipped in via raw types or type erasure, parameterize it.","If you must use Object, avoid property-level access (getPropertyValue/setPropertyValue) and use method invocation instead.","Check hasProperty(name) before calling getPropertyValue to fail gracefully."],"exampleFix":"// before\npublic interface MyService { Object getData(); }\n// after\npublic interface MyService { MyDataDto getData(); }","handlingStrategy":"validation","validationCode":"// Before calling getPropertyValue on a Wrapper:\nif (wrapper.hasProperty(name)) {\n    Object val = wrapper.getPropertyValue(instance, name);\n} else {\n    // property does not exist; handle gracefully\n}","typeGuard":"// Ensure the wrapped class is not Object before property access\nstatic boolean isPropertyAccessible(Wrapper w) {\n    return w.getPropertyNames().length > 0;\n}","tryCatchPattern":"try {\n    Object v = wrapper.getPropertyValue(instance, name);\n} catch (NoSuchPropertyException e) {\n    // log and use fallback or skip\n}","preventionTips":["Use concrete POJO types instead of Object for service parameters/return types.","Call hasProperty(name) before getPropertyValue when the property set is dynamic.","Avoid wrapping java.lang.Object; ensure service interfaces are concrete and on the classpath."],"tags":["reflection","bytecode","wrapper","property","rpc"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}