Debugging @Connect Mapping Error


I’m having occasional trouble when switching views in Vaadin 7.1.11. I get the following error on the client side:

Widgetset ‘com.hic.WidgetSet’ does not contain implementation for com.sun.proxy.$Proxy45. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.

And I also see the followng in my browser console:

com.vaadin.client.VConsole SEVERE: Hierachy claims UnknownComponentConnector (1) has component children even though it isn’t a HasComponentsConnector

Now, I say occasional, because it doesn’t happen all the time. Sometimes my application works fine. Other times this will happen. If I hit the refresh button several times on my browser, eventually this goes away and all works as expected.

The other piece of information that may be relavant to this is that this only seems to occur when switching UI/Servlets. This occurs when I transition from my login servlet through Spring Security form POST on the client side to my main UI sevlet. The Spring code seems to be getting called as expected and the security context is getting setup. I know this because my main UI would never load the view if it wasn’t.

So I ask, how do I go about debugging this? What is com.sun.proxy$Proxy45? Which component is the @Connect error message about?

Thanks in advance for your help.

I have exactly the same problem. It happens roughly once in every 10 view opening.
I integrated Spring with Vaadin, and used Spring Security for user management, when this started to happen.
Any hints/ideas on what is happening? Which direction should I look for a solution?

An old thread and not exactly a solution, but a few words on what seems to be happening here.

Dependency injection frameworks such as Spring and CDI (with scopes that are annotated with @NormalScope) create proxies for injected beans. These proxies can have multiple roles, including supporting interceptors and decorators, making circular injections possible etc. The details (and exact issues) depend a lot on the implementation of the proxies, which are typically implemented as bytecode generated on the fly - Spring, Weld and OpenWebBeans all generate somewhat different proxies.

Unfortunately, situations where a proxy is compared to the bean whose proxy it is don’t always work as one would like. This causes problems e.g. in Java Collections, especially when the generated proxy breaks the contract set in java.lang.Object for equals() and hashCode(). This can also happen inside Vaadin when components are injected.

Some such issues in the framework have been fixed recently to try to make it more tolerant of such proxies, but such issues are often hard to find. If you do have a simple way to reproduce such issues, please
file a ticket