Problem with vaadinvisualizations addon NoClassDefFoundError

Hi guys,
i have a problem with vaadinvisualizations addon, when i try to create a chart i have this exception
I have included this libraries:

VisualizationsForVaadin.jar (lastest release)
gwt-visualization.jar (1.0.2 i also tryed with 1.1.1 version)
vaadin (6.4.4)
can oanyone help me?

java.lang.NoClassDefFoundError: org/vaadin/vaadinvisualizations/ScatterChart
at it.enel.csl.gui.vaadin.TestVisualizzationGoogle.initComponents(TestVisualizzationGoogle.java:29)
at it.enel.csl.gui.vaadin.WindowsController.openWindow(WindowsController.java:90)
at it.enel.csl.gui.vaadin.WindowsController.openWindow(WindowsController.java:114)
at it.enel.csl.gui.vaadin.MenuCommand.menuSelected(MenuCommand.java:63)
at com.vaadin.ui.MenuBar.changeVariables(MenuBar.java:173)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1094)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:590)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:266)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:476)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3404)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1398)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

Just to double check, you have the jars in the web inf… lib dir?
Regards Phil

Yes. The jar are into WEB-INF/lib. At compilation time i don’t have any probleam but at runtime the application cannot find the class.

i solved the previous problem but when the application is compiled i see this error.

INFO: Failed to load class org.vaadin.vaadinvisualizations.OrganizationalChart. java.lang.UnsupportedClassVersionError: org/vaadin/vaadinvisualizations/OrganizationalChart : unsupported classversion 50.0
26-feb-2011 16.48.43 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer tryToAdd
INFO: Failed to load class org.vaadin.vaadinvisualizations.AnnotatedTimeLineEntry. java.lang.UnsupportedClassVersionError: org/vaadin/vaadinvisualizations/AnnotatedTimeLineEntry : unsupported classversion 50.0
26-feb-2011 16.48.43 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer tryToAdd
INFO: Failed to load class org.vaadin.vaadinvisualizations.LineChartImage. java.lang.UnsupportedClassVersionError: org/vaadin/vaadinvisualizations/LineChartImage : unsupported classversion 50.0
26-feb-2011 16.48.43 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer tryToAdd
INFO: Failed to load class org.vaadin.vaadinvisualizations.CommonVisualizationComponent. java.lang.UnsupportedClassVersionError: org/vaadin/vaadinvisualizations/CommonVisualizationComponent : unsupported classversion 50.0

Widgetset does not contain implementation for org.vaadin.vaadinvisualizations.LineChart. Check its @ClientWidget 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. Unrendered UIDL:
org.vaadin.vaadinvisualizations.LineChart(NO CLIENT IMPLEMENTATION FOUND

This looks like VaadinVisualizations classes have been compiled with JDK 6.0 without saying “target=1.5”, and you are trying to use them with JDK 5.0. Vaadin core and most add-ons have been compiled to be JDK 5.0 compatible, but apparently the current version of VisualizationsForVaadin is not (a third party component). Maybe Phil can recompile it if there are no real JDK 6.0 dependencies.

If this is not caused by the previous problem, check that the widgetset has been compiled (in WebContent/VAADIN/widgetsets/…) and that the widgetset compiler indicates that widget was included. Then make sure your web.xml refers to the correct widgetset. See
the instructions for using add-ons
.

might also be running into this problem
http://groups.google.com/group/gwt-google-apis/browse_thread/thread/57bfeeeb06694886
which seems to be some failure with the 1.1 jar which at least appears on a mac, didnt show up on windows.

Hi phil, thanks for your reply, i try the solution but during the gwt compilation the previous error are solved. But a runtime i have the same problem and i cannot see the chart.

Can you tell me what jar i must use in my application.

i have in my WEB-INF/lib

gwt-ajaxloader.jar
gwt-visualization.jar (1.1 i have also try with 1.0 and previous)
vaadin-6.4.4.jar
VisualizationsForVaadin.jar (i tryed with version 1.2, and 1.1)

Hi Marco, the best I can say is send me your eclipse project and I can take a look (email is in svn libs), otherwise I can create an eclipse project in svn that I have working and include the jars (windows only as I have to create a ticket relating to the gwt-ajaxloader issues)

regards Phil

I created this project
http://dev.vaadin.com/browser/contrib/VisExample
which works for me and displays a pie chart

Regards Phil

Thank you very much. It is very usefull for me. Great addon

Hi,
When calling addComponent(pc) threw exception java.lang.IncompatibleClassChangeError

at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:204)
	at com.vaadin.ui.AbstractOrderedLayout.addComponent(AbstractOrderedLayout.java:72)
	at adminorg.OrgForm.paintOrgSchem(OrgForm.java:88)

Code:

private Panel paintOrgSchem(){
		OrgPanel = new Panel();
		OrgPanel.setScrollable(true);
		VerticalLayout AL = new VerticalLayout();
		PieChart pc = new PieChart();
		pc.setWidth("500px");
		pc.setHeight("500px");
		pc.add("Work", 7);
		pc.add("Play", 3);
		pc.add("Eat", 1.5);
		pc.add("Sleep", 6);
		pc.add("Do Vaadin", 7);
		pc.setOption("width", 600);
		pc.setOption("height", 400);
		pc.setOption("title", "My Daily Activities");
		pc.setColors("red", "green", "#0000ff", "orange", "slategray");
		pc.setOption("legend", "right");
		AL.addComponent(pc);
		OrgPanel.setContent(AL);
		return OrgPanel;		
	}

libraries:
VaadinVisualization2.1.jar
gwt-visualization.jar (1.1.2)
vaadin (6.7.4)