I’m having problems implementing the VisualizationsForVaadin addon.
I’ve added the addon JAR via Maven to my project, but it comes back with ‘class file has wrong version 50.0, should be 49.0’. I’ve tried re-compiling the addon, but had no luck. I’m using Java 1.5. Did anyone get this working in a 1.5 compiled application?
I have managed to re-compile the addon with JDK1.5 and am no longer getting the above error message. However, the widgets don’t work.
I’m now getting the following error when loading the application:
I’m using the following versions (defined in Maven):
Vaadin 6.4.0
VisualizationsForVaadin 0.0.5
GWT Visualization 1.1.0
GWT User 2.0.4
When I try to package me application I get the following output:
C:\Java\jdk1.6.0_16\bin\java -Xms256m -Xmx512m -Dclassworlds.conf=D:\Apache\maven-2.2.1\bin\m2.conf -Dmaven.home=D:\Apache\maven-2.2.1 -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 9.0.1\bin" -Dfile.encoding=windows-1252 -classpath "D:\Apache\maven-2.2.1\boot\classworlds-1.1.jar;C:\Program Files\JetBrains\IntelliJ IDEA 9.0.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -f D:\workspace_idea\gisadmin\pom.xml package
+ Enabling strict checksum verification on all artifact downloads.
[INFO]
Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO]
Building gisadmin
[INFO]
task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO]
snapshot org.codehaus.mojo:gwt-maven-plugin:1.3-SNAPSHOT: checking for updates from codehausSnapshots
[INFO]
snapshot org.codehaus.mojo:gwt-maven-plugin:1.3-SNAPSHOT: checking for updates from codehausSnapshots
[ERROR]
Plugin contains a <goals/> section: this is IGNORED - please use <executions/> instead.
[INFO]
[resources:resources {execution: default-resources}]
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
Copying 8 resources
[INFO]
[gwt:resources {execution: default}]
[INFO]
auto discovered modules [com.dme.gisadmin.widgetset.GISAdminAppWidgetset]
[INFO]
1 source files copied from GWT module com.dme.gisadmin.widgetset.GISAdminAppWidgetset
[INFO]
[compiler:compile {execution: default-compile}]
[INFO]
Nothing to compile - all classes are up to date
[INFO]
[resources:testResources {execution: default-testResources}]
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory D:\workspace_idea\gisadmin\src\test\resources
[INFO]
[compiler:testCompile {execution: default-testCompile}]
[INFO]
Nothing to compile - all classes are up to date
[INFO]
[surefire:test {execution: default-test}]
[INFO]
Surefire report directory: D:\workspace_idea\gisadmin\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.dme.gisadmin.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[gwt:compile {execution: default}]
[INFO]
using GWT jars from project dependencies : 2.0.4
[INFO]
auto discovered modules [com.dme.gisadmin.widgetset.GISAdminAppWidgetset]
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
Compiling module com.dme.gisadmin.widgetset.GISAdminAppWidgetset
[INFO]
Scanning for additional dependencies: jar:file:/D:/Apache/maven-2.2.1/repository/com/vaadin/vaadin/6.4.0/vaadin-6.4.0.jar!/com/vaadin/terminal/gwt/client/WidgetSet.java
[INFO]
Computing all possible rebind results for 'com.vaadin.terminal.gwt.client.WidgetMap'
[INFO]
Rebinding com.vaadin.terminal.gwt.client.WidgetMap
[INFO]
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@b7e845
[INFO]
Detecting Vaadin components in classpath to generate WidgetMapImpl.java ...
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VLineChart was not found. The component org.vaadin.vaadinvisualizations.LineChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VGauge was not found. The component org.vaadin.vaadinvisualizations.Gauge will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VPieChart was not found. The component org.vaadin.vaadinvisualizations.PieChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VImageChart was not found. The component org.vaadin.vaadinvisualizations.ImageChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VScatterChart was not found. The component org.vaadin.vaadinvisualizations.ScatterChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VBarChart was not found. The component org.vaadin.vaadinvisualizations.BarChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VTable was not found. The component org.vaadin.vaadinvisualizations.Table will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VSparklineImage was not found. The component org.vaadin.vaadinvisualizations.SparklineImage will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VAnnotatedTimeLine was not found. The component org.vaadin.vaadinvisualizations.AnnotatedTimeLine will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VMap was not found. The component org.vaadin.vaadinvisualizations.Map will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VAreaChart was not found. The component org.vaadin.vaadinvisualizations.AreaChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VLineChartImage was not found. The component org.vaadin.vaadinvisualizations.LineChartImage will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VMotionChart was not found. The component org.vaadin.vaadinvisualizations.MotionChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VAreaChartImage was not found. The component org.vaadin.vaadinvisualizations.AreaChartImage will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VBarChartImage was not found. The component org.vaadin.vaadinvisualizations.BarChartImage will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VIntensityMap was not found. The component org.vaadin.vaadinvisualizations.IntensityMap will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VOrganizationalChart was not found. The component org.vaadin.vaadinvisualizations.OrganizationalChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VPieChartImage was not found. The component org.vaadin.vaadinvisualizations.PieChartImage will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VColumnChart was not found. The component org.vaadin.vaadinvisualizations.ColumnChart will not be included in the widgetset.
[INFO]
[WARN]
Widget class org.vaadin.vaadinvisualizations.widgetset.client.ui.VGeoMap was not found. The component org.vaadin.vaadinvisualizations.GeoMap will not be included in the widgetset.
[INFO]
Widget set will contain implementations for following components:
[INFO]
com.vaadin.ui.AbsoluteLayout
[INFO]
com.vaadin.ui.Accordion
[INFO]
com.vaadin.ui.Button
[INFO]
com.vaadin.ui.CheckBox
[INFO]
com.vaadin.ui.ComboBox
[INFO]
com.vaadin.ui.CssLayout
[INFO]
com.vaadin.ui.CustomComponent
[INFO]
com.vaadin.ui.CustomLayout
[INFO]
com.vaadin.ui.DateField
[INFO]
com.vaadin.ui.DragAndDropWrapper
[INFO]
com.vaadin.ui.Embedded
[INFO]
com.vaadin.ui.Form
[INFO]
com.vaadin.ui.FormLayout
[INFO]
com.vaadin.ui.GridLayout
[INFO]
com.vaadin.ui.HorizontalLayout
[INFO]
com.vaadin.ui.Label
[INFO]
com.vaadin.ui.Link
[INFO]
com.vaadin.ui.ListSelect
[INFO]
com.vaadin.ui.MenuBar
[INFO]
com.vaadin.ui.NativeButton
[INFO]
com.vaadin.ui.NativeSelect
[INFO]
com.vaadin.ui.OptionGroup
[INFO]
com.vaadin.ui.OrderedLayout
[INFO]
com.vaadin.ui.Panel
[INFO]
com.vaadin.ui.PopupView
[INFO]
com.vaadin.ui.ProgressIndicator
[INFO]
com.vaadin.ui.RichTextArea
[INFO]
com.vaadin.ui.Select
[INFO]
com.vaadin.ui.Slider
[INFO]
com.vaadin.ui.SplitPanel
[INFO]
com.vaadin.ui.TabSheet
[INFO]
com.vaadin.ui.Table
[INFO]
com.vaadin.ui.TextField
[INFO]
com.vaadin.ui.Tree
[INFO]
com.vaadin.ui.TwinColSelect
[INFO]
com.vaadin.ui.Upload
[INFO]
com.vaadin.ui.UriFragmentUtility
[INFO]
com.vaadin.ui.VerticalLayout
[INFO]
com.vaadin.ui.Window
[INFO]
Done. (0seconds)
[INFO]
Scanning for additional dependencies: jar:file:/D:/Apache/maven-2.2.1/repository/com/vaadin/vaadin/6.4.0/vaadin-6.4.0.jar!/com/vaadin/terminal/gwt/client/ui/dd/VAcceptCriteria.java
[INFO]
Computing all possible rebind results for 'com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory'
[INFO]
Rebinding com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory
[INFO]
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@b7e845
[INFO]
Detecting available criteria ...
[INFO]
creating mapping for com.vaadin.ui.AbstractSelect.AcceptItem
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.AcceptAll
[INFO]
creating mapping for com.vaadin.ui.AbstractSelect.TargetItemIs
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.And
[INFO]
creating mapping for com.vaadin.ui.Tree.TreeDropCriterion
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIsTarget
[INFO]
creating mapping for com.vaadin.ui.Tree.TargetInSubtree
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.TargetDetailIs
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.Not
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.ServerSideCriterion
[INFO]
creating mapping for com.vaadin.ui.Table.TableDropCriterion
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.Or
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIs
[INFO]
Done. (0seconds)
[INFO]
Compiling 6 permutations
[INFO]
Compiling permutation 0...
[INFO]
Process output
[INFO]
Compiling permutation 1...
[INFO]
Compiling permutation 2...
[INFO]
Compiling permutation 3...
[INFO]
Compiling permutation 4...
[INFO]
Compiling permutation 5...
[INFO]
Compile of permutations succeeded
[INFO]
Linking into D:\workspace_idea\gisadmin\target\GISAdmin\VAADIN\widgetsets\com.dme.gisadmin.widgetset.GISAdminAppWidgetset. Writing extras to D:\workspace_idea\gisadmin\target\extra\com.dme.gisadmin.widgetset.GISAdminAppWidgetset
[INFO]
Link succeeded
[INFO]
Compilation succeeded -- 101.845s
[INFO]
[war:war {execution: default-war}]
[INFO]
Packaging webapp
[INFO]
Assembling webapp[gisadmin]
in [D:\workspace_idea\gisadmin\target\GISAdmin]
[INFO]
Dependency[Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.5, type=jar}]
has changed (was Dependency {groupId=commons-lang, artifactId=commons-lang, version=2.5, type=jar}).
[INFO]
Dependency[Dependency {groupId=com.vaadin, artifactId=vaadin, version=6.4.0, type=jar}]
has changed (was Dependency {groupId=com.vaadin, artifactId=vaadin, version=6.4.0, type=jar}).
[INFO]
Dependency[Dependency {groupId=org.apache.ibatis, artifactId=ibatis-core, version=3.0, type=jar}]
has changed (was Dependency {groupId=org.apache.ibatis, artifactId=ibatis-core, version=3.0, type=jar}).
[INFO]
Dependency[Dependency {groupId=log4j, artifactId=log4j, version=1.2.16, type=jar}]
has changed (was Dependency {groupId=log4j, artifactId=log4j, version=1.2.16, type=jar}).
[INFO]
Dependency[Dependency {groupId=com.google.gwt, artifactId=gwt-user, version=2.0.4, type=jar}]
has changed (was Dependency {groupId=com.google.gwt, artifactId=gwt-user, version=2.0.4, type=jar}).
[INFO]
Dependency[Dependency {groupId=org.vaadin, artifactId=vaadinvisualizations, version=0.0.5, type=jar}]
has changed (was Dependency {groupId=org.vaadin, artifactId=vaadinvisualizations, version=0.0.5, type=jar}).
[INFO]
Dependency[Dependency {groupId=xerces, artifactId=xercesImpl, version=2.9.1, type=jar}]
has changed (was Dependency {groupId=xerces, artifactId=xercesImpl, version=2.9.1, type=jar}).
[INFO]
Processing war project
[INFO]
Copying webapp resources[D:\workspace_idea\gisadmin\src\main\webapp]
[INFO]
Webapp assembled in[407 msecs]
[INFO]
Building war: D:\workspace_idea\gisadmin\target\GISAdmin.war
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO]
Total time: 1 minute 54 seconds
[INFO]
Finished at: Wed Jul 21 09:58:03 EST 2010
[INFO]
Final Memory: 17M/254M
[INFO]
------------------------------------------------------------------------
Process finished with exit code 0
Is there anything missing or can anyone see anything wrong with that output? I’ve looked into the VAADIN/widgetsets folder in the WAR file and I can see the “com.dme.gisadmin.widgetset.GISAdminAppWidgetset” folder there with a number of files inside.
Is there anything I might have missed? As far as I can tell the widgetset has been compiled and is available, so I’m not sure why I’m getting that message when I try to load the PieChart.
I have managed to get it working by making sure that source files are also included in the JAR, not just classes.
Does anyone know whether it’s possible to add charts as components to a main window? I can only get this to work if I add a chart to it’s own subwindow.
Dear Jerry, could you elaborate a little further?
I am also trying to get VisualizationsForVaadin working but for now all i get is an empty ‘gwt’ folder in the target directory.
Which sources are you including, could you copy-paste the pom code snippet?
Thanks!
I have created a Java project from the VisualizationsForVaadin.jar in Netbeans (just a simple Java project), and rebuilt it using Java 1.5. In build options there is a filter to ignore .java file which I have removed, and so when you build the project you end up with .class files as well as .java files in the JAR.
I have added that JAR to my local Maven repository, and referenced it in my pom.xml file of my web application. Please see my initial post with the dependencies included in my pom.xml.
When you run the ‘vaadin:update-widgetset’ target it should update your .gwt.xml file with a reference to the VaadinvisualizationApplicationWidgetset
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset" />
</module>
Then you can run the ‘package’ target and that should compile your widgetsets and add them to webapp/VAADIN/widgetset.
The only problem I have found with this addon is that when you load your app it doesn’t display. You need to resize the browser window to make sure the visualization is drawn.