Custom WidgetSet ClassCastException

A little background first. I am writing a standalone application running on embedded jetty. It is not compiled as a war, but does deploy a WebContent folder with VAADIN and WEB-INF (with a web.xml for use in embedded jetty running alongside a guice container). Currently this is using vaadin 7.4.4 and Java 1.7. All other features are currently working in this configuration.

Right now, I want to add a custom renderer (call it for now a currency renderer). I cannot use the one present in the add-ons as that was built for 6.0 and I am taking the opportunity to figure out the under-the-covers items of vaadin/gwt. Based on the basics I know …

  • created a that extends import com.vaadin.ui.Grid.AbstractRenderer
  • created a CurrencyRendererWidgetset.gwt.xml with

created a client component CurrencyRendererClient which inherits import com.vaadin.client.renderers.Renderer
created a connector class to put these all together

public class CurrencyRendererConnector extends AbstractRendererConnector {
public CurrencyRendererClient getRenderer() {
return (CurrencyRendererClient) super.getRenderer();

  • compile the gwt widgetset, put into WebContent/VAADIN/widgetsets deployed
  • compile the jars and placed into WebContent/WEB-INF/lib

So, when I run this and try to use it in a vaadin grid, I get the following error (via Chrome javascript debugger, no error on the server):

Tue Jun 16 05:50:06 GMT-600 2015 com.vaadin.client.ApplicationConnection
SEVERE: Error sending state change Exception caught: undefined
at Unknown.Eg(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Ig(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Og(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Ex(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Hx(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.IAb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.WAb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Ywb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Swb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.cwb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.awb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Dxb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Jx(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.ey(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.oi(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
Caused by: java.lang.ClassCastException

Clearly I missed something in a step to create custom widgets, but I am not sure what. Anyone know or have a good custom widgetset guide? The vaadin one is missing some items about creating when not using the eclipse plugin.

Hello David,

Have you found a way around this? I’m also facing a similar issue.

Hello David

Were you able to fix this issue?

I have a couple of possible avenues, I hope to have time this week to work on it. If so I will post the results.

David were you able to add the custom renderer into the Grid?

Bit of an old original post but:
What you see here looks like a client-side exception. When the widsetsets compilation setting is on the default “Obfiscated” all Errors, even if it was just a NullPointerException, will come out as Unknow + some weird letters/numbers because the used classes are compiled into smaller js “classes/files/whatever you want to call it”.
To know more on that topic and to see how to debug it read:
mostly the part at the bottom and also some newer articles on Super Dev mode. There might be some in the new book of vaadin too