Hi, we have a webapp on Vaadin 7 on tomcat, that runs fine, but after a while, usually a few hours or more, one the TextField that a propertyDataSource is set starts to be rendered as readOnly, regardless of of th readOnly setting. We can’t reproduce this at will. When this happen, we did a heap dump and noticed that the setMethod is null, but the getter method has a weird value: the return type is a Serializable instead of a String. The class of the object that it is bind to have a getter and setter for the attribute and it is of type String.
Before this incident occurs, the MethodProperty.setMethod has a value of the setter method on the object class, and the getMethod return type is String. Why sould it suddenly changed to Serializable?
Is the corresponding getter by any chance declared in an interface that has a more general return type than in the implementing class? There is e.g.
http://bugs.java.com/view_bug.do?bug_id=6852569 that might cause problems with such approach.
Hi Anna, Thanks for pointing out the bug. The class that we use for the propertyDataSource does not have a getter declared in the interface that return a more general return type. I also tested the code from the bug with our JDK (JDK 1.7.0_05) and it does not reproduce. We have been running with this combination for a while and we recently saw this behavior happening.
Do you happen to have a test project that can reproduce the issue even irregularly? I’ve never seen it happen myself but I’ve heard of a case where something similar happened systematically after no one had used the application for a couple of hours, but that one apparently got solved by getting rid of the interface getters. Their problem wasn’t caused by that particular bug either, in fact, but since the workaround did the trick they didn’t investigate it further (that I’ve heard of). Can’t be the same issue if you don’t have an interface, though.
Thanks for letting us know that you’ve heard of another case We are still unsure as to why this occurs, but it appears the propertyDescriptors somehow just loses the setter information after running a while. Not sure what triggers it. We cleared the Introspector cache, and the problem goes away.
An update — After we updated our JDK to the Java7u76, the problem went away. We suspect it is some underlying JDK issue that is fixed in the latest update.