Could not initialize class com.vaadin.addon.charts.util.ChartSerialization

Hi,

I have migrated our Vaadin-Project from Vaadin 7 to Vaadin 8.0.6.
For now, I’m relying on the compatibility classes and all is working well.

Now I tried to use Vaadin Charts 4.0.0 (which has to be used with Vaadin 8, right?)

I’m getting an exception during runtime when I activate the Tab which contains the chart:


java.lang.NoClassDefFoundError: Could not initialize class com.vaadin.addon.charts.util.ChartSerialization

(full stacktrace at the end of this post)

The class ChartSerialization is available (it is provided in vaadin-charts-4.0.0.jar, which I can see in my classpath), so I wonder what’s going wrong here.

Do I have to refactor my application to not use V7-compatibility classes before using Charts 4.0.0?
This would be much effort, so I hope I can fix this without going the painful way… :wink:

Any suggestions?

Thanks in advance,

Jens

Here is the full stacktrace:
java.lang.NoClassDefFoundError: Could not initialize class com.vaadin.addon.charts.util.ChartSerialization
at com.vaadin.addon.charts.Chart.beforeClientResponse(Chart.java:431)
at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:110)
at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:168)
at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:146)
at com.vaadin.ui.UI.push(UI.java:1589)
at com.vaadin.server.VaadinSession.unlock(VaadinSession.java:1011)
at com.vaadin.server.VaadinService.requestEnd(VaadinService.java:1411)
at com.vaadin.server.communication.PushHandler.callWithUi(PushHandler.java:272)
at com.vaadin.server.communication.PushHandler.onMessage(PushHandler.java:520)
at com.vaadin.server.communication.PushAtmosphereHandler.onMessage(PushAtmosphereHandler.java:87)
at com.vaadin.server.communication.PushAtmosphereHandler.onRequest(PushAtmosphereHandler.java:77)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:223)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115)
at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:68)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2284)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:593)
at org.atmosphere.websocket.DefaultWebSocketProcessor$3.run(DefaultWebSocketProcessor.java:345)
at org.atmosphere.util.VoidExecutorService.execute(VoidExecutorService.java:101)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:340)
at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:447)
at org.atmosphere.container.JSR356Endpoint$3.onMessage(JSR356Endpoint.java:260)
at org.atmosphere.container.JSR356Endpoint$3.onMessage(JSR356Endpoint.java:257)
at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:393)
at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:494)
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:289)
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:60)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:203)
at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:198)
at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:96)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:663)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)