Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Random error with widgetset?

Mathieu Nivoliez
8 years ago Aug 25, 2014 3:12pm
Thomas Mattsson
8 years ago Aug 26, 2014 4:33am
Mathieu Nivoliez
8 years ago Aug 26, 2014 8:42am
Thomas Mattsson
8 years ago Aug 26, 2014 9:19am
Kishore Shetty
8 years ago Aug 28, 2014 11:55am
Thomas Mattsson
8 years ago Aug 28, 2014 12:04pm

The fundamental issue here is that Vaadin uses the runtime class of a component object to determine what widget to place on the client. This works well when using real objects; a Button object maps to a ButtonConnector object. But when using proxies, there is no way for Vaadin to know what the 'real' class should be. It can't map a Proxy object to a ButtonConnector even if it wanted to.

As I have never used Aspect, I can't give you any better advice. But as I mentioned in my previous post, start by determining which component should have been rendered. Find the place where that object is created in code. That is where the error happens, one way or the other.

Kishore Shetty
8 years ago Aug 28, 2014 1:18pm
Mac Przepióra
8 years ago Aug 28, 2014 3:34pm
Sinaver Idrisov
8 years ago Oct 09, 2014 5:09pm
Serghey Bishyr
7 years ago Jul 01, 2015 12:55pm

I have the same problem. In my case it was fixed with proxyTargetClass = true param in @EnableGlobalMethodSecurity annotation.
My SecurityConfig class looks like this:

@Configuration
@ComponentScan
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true, proxyTargetClass = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
//Class body
}