You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/12/08 18:24:15 UTC
DO NOT REPLY [Bug 32590] New: -
WrapDynaBean misleading error message: Property has no read method
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32590>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32590
Summary: WrapDynaBean misleading error message: Property has no
read method
Product: Commons
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Bean Utilities
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: daveb@davebsoft.com
WrapDynaBean gives a misleading error message: "Property foo has no read method"
when actually there is a getFoo() method, but it throws an exception.
WrapDynaBean:
public Object get(String name) {
Object value = null;
try {
value = PropertyUtils.getSimpleProperty(instance, name);
} catch (Throwable t) {
throw new IllegalArgumentException
("Property '" + name + "' has no read method");
}
Here's an example of the "getFoo()" throwing an exception. I'm using XmlBeans to
get a data value which is invalid:
org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException
at org.apache.xmlbeans.impl.values.JavaIntHolder.set_text(JavaIntHolder.java:42)
at
org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1068)
at
org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1206)
at org.apache.xmlbeans.impl.values.JavaIntHolder.intValue(JavaIntHolder.java:52)
at
org.apache.xmlbeans.impl.values.XmlObjectBase.getIntValue(XmlObjectBase.java:1424)
But as you can see, get() completely masks the real error.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org