Any suggestions on why add-on widgetsets are not compiling?

Hi there,

I’m new to Vaadin and have been playing around with the different components, but unfortunately I haven’t been able to get any of the add on functionalities working.

I’ve checked around the forums and this are the steps I’ve tried.

Forcibly deleted jars from WEB-INF/lib to have eclipse recompile the widgetsets
Use Compile Vaadin widgets from the eclipse toolbar

For e.g. Using the Vaadin visualization add-on this is what I see in the console



Compiling widgetset com.example.neighbourhood.widgetset.NeighbourhoodWidgetset
Updating GWT module description file...
Jun 4, 2010 10:36:09 AM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Widgetsets found from classpath:
	com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/vaadin-6.3.3.jar!/
	com.example.neighbourhood.widgetset.NeighbourhoodWidgetset in file:/Users/akulkarni/workspace/Neighbourhood/src
	org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset in jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/VisualizationsForVaadin1.jar!/

Done.
Starting GWT compiler
Widgetset compilation completed

My local gwt.xml looks like this


<?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" />
	
    <!--
     Uncomment the following to compile the widgetset for one browser only.
     This can reduce the GWT compilation time significantly when debugging.
     The line should be commented out before deployment to production
     environments.
      
     Multiple browsers can be specified for GWT 1.7 as a comma separated
     list. The supported user agents at the moment of writing were:
     ie6,ie8,gecko,gecko1_8,safari,opera
     
     The value gecko is used for Firefox 3 and later, gecko1_8 is for
     Firefox 2 and safari is used for  webkit based browsers including
     Google Chrome.
    -->
    <!-- <set-property name="user.agent" value="gecko"/> -->

    
    

    

    <inherits name="org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset" />
</module>

I still see errors though



Widgetset does not contain implementation for org.vaadin.vaadinvisualizations.PieChart. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:

	org.vaadin.vaadinvisualizations.PieChart(NO CLIENT IMPLEMENTATION FOUND)
Widgetset does not contain implementation for org.vaadin.vaadinvisualizations.AreaChart. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:

	org.vaadin.vaadinvisualizations.AreaChart(NO CLIENT IMPLEMENTATION FOUND)

I’ve tried a couple more add-ons just to see if it might be isolated but I see the same behaviour.

Browsers: Chrome, Firefox
OS: Mac OS
IDE: Eclipse Build id: 20100218-1602

Any suggestions before I give up on Vaadin?

Hi, so the Visualization widget also requires that you include the GWT Visualization jar and you also have to use this old GWT vis jar (till I upload a new version of the Visualization add on, which should be ths weekend) which you can find from here
http://code.google.com/p/gwt-google-apis/downloads/list
(you will need gwt-visualization-1.0.2)

Regards Phil

It’s not the 1.0.2 jar. I’ve used that and I still have an issue.

As I mentioned its not related to 1 particular add-on as I’ve had the issue with other add-ons (unless I’m really dense and cant follow instructions).

There is something related to either my environment (assuming I’m the only having a problem) or the plugins dont work for my particular computer configuration.

Hi!

Enable the “Verbose compilation output” setting from your project’s Vaadin properties (in Eclipse). It might give some further hints.

cheers,
matti

Is the widgetset updated to the server? Can you access the widgetset files mentioned in the page source, e.g. http://server:8080/App/VAADIN/widgetsets/com.vaadin.example.gwt.ExampleWidgetset?com.vaadin.example.gwt.ExampleWidgetset.nocache.js with your browser?

One more possible cause:

If you’re using tomcat with eclipse, it’s sometimes necessary to clean everything tomcat-related in order to get tomcat to see the updated files. When starting tomcat via eclipse, it copies the files to a working directory, and sometimes it just does not seem to update the working directory. I’m not sure exactly when and why this happens, but it’s happened a few times, and I always waste some time before I realize whats going on. “Clean Tomcat work directory” (and/or “Clean…”) in the context menu for the server in the Servers -tab (phew) usually does the trick.

Best Regards,
Marc

Tried cleaning the tomcat server output directory … no luck

I could access the nocache.js file on the server. I ran a diff against the file in WebContent/VAADIN/widgetsets/com…/com…nocache.js and the file matched

Haven’t yet figured out where the verbose output flag is, so let me get back as soon as I can get that sorted out.

MyProject → Properties → Vaadin, in the widgetset section - assuming you are using a relatively recent version of the Eclipse plugin.

Ok, after my initial post I switched my workspace. When I move back to the vaadin workspace the vaadin option no longer appears under properties/preferences (though the compile widgetsets button still exists on the toolbar). Unfortunately when I try to reinstall the plugin, it says that the plugin is already installed and cannot install it.

So this might take a bit of time as I have to find all the related plugins and delete it…

This is what I see with verbose turned on.

Executing compiler with parameters
[/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java, -Djava.awt.headless=true, -Xss8M, -Xmx512M, -XX:MaxPermSize=512M, -XstartOnFirstThread, -classpath, /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar:/Users/akulkarni/workspace/Neighbourhood/src:/Users/akulkarni/workspace/Neighbourhood/build/classes:/Users/akulkarni/eclipse/configuration/com.vaadin.integration.eclipse/download/gwt-dev/2.0.3/gwt-dev.jar:/Users/akulkarni/eclipse/configuration/com.vaadin.integration.eclipse/download/gwt-user/2.0.3/gwt-user.jar:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/vaadin-6.3.3.jar:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/VisualizationsForVaadin1.jar:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/gwt-visualization.jar, com.vaadin.tools.WidgetsetCompiler, -out, WebContent/VAADIN/widgetsets, -localWorkers, 2, -logLevel, INFO, com.example.neighbourhood.widgetset.NeighbourhoodWidgetset]
Updating GWT module description file…
Jun 19, 2010 7:37:02 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Widgetsets found from classpath:
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/vaadin-6.3.3.jar!/
com.example.neighbourhood.widgetset.NeighbourhoodWidgetset in file:/Users/akulkarni/workspace/Neighbourhood/src
org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset in jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/VisualizationsForVaadin1.jar!/

Done.
Starting GWT compiler
Compiling module com.example.neighbourhood.widgetset.NeighbourhoodWidgetset
Scanning for additional dependencies: jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/vaadin-6.3.3.jar!/com/vaadin/terminal/gwt/client/DefaultWidgetSet.java
Computing all possible rebind results for ‘com.vaadin.terminal.gwt.client.WidgetMap’
Rebinding com.vaadin.terminal.gwt.client.WidgetMap
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@39912c
Detecting Vaadin components in classpath to generate WidgetMapImpl.java …
Widget set will contain implementations for following components:
com.vaadin.ui.AbsoluteLayout
com.vaadin.ui.Accordion
com.vaadin.ui.Button
com.vaadin.ui.CheckBox
com.vaadin.ui.ComboBox
com.vaadin.ui.CssLayout
com.vaadin.ui.CustomComponent
com.vaadin.ui.CustomLayout
com.vaadin.ui.DateField
com.vaadin.ui.DragAndDropWrapper
com.vaadin.ui.Embedded
com.vaadin.ui.Form
com.vaadin.ui.FormLayout
com.vaadin.ui.GridLayout
com.vaadin.ui.HorizontalLayout
com.vaadin.ui.Label
com.vaadin.ui.Link
com.vaadin.ui.ListSelect
com.vaadin.ui.MenuBar
com.vaadin.ui.NativeButton
com.vaadin.ui.NativeSelect
com.vaadin.ui.OptionGroup
com.vaadin.ui.OrderedLayout
com.vaadin.ui.Panel
com.vaadin.ui.PopupView
com.vaadin.ui.ProgressIndicator
com.vaadin.ui.RichTextArea
com.vaadin.ui.Select
com.vaadin.ui.Slider
com.vaadin.ui.SplitPanel
com.vaadin.ui.TabSheet
com.vaadin.ui.Table
com.vaadin.ui.TextField
com.vaadin.ui.Tree
com.vaadin.ui.TwinColSelect
com.vaadin.ui.Upload
com.vaadin.ui.UriFragmentUtility
com.vaadin.ui.VerticalLayout
com.vaadin.ui.Window
Done. (16seconds)
Scanning for additional dependencies: jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/vaadin-6.3.3.jar!/com/vaadin/terminal/gwt/client/ui/dd/VAcceptCriteria.java
Computing all possible rebind results for ‘com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory’
Rebinding com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@39912c
Detecting available criteria …
creating mapping for com.vaadin.event.dd.acceptcriteria.AcceptAll
creating mapping for com.vaadin.ui.AbstractSelect.TargetItemIs
creating mapping for com.vaadin.event.dd.acceptcriteria.Not
creating mapping for com.vaadin.event.dd.acceptcriteria.And
creating mapping for com.vaadin.event.dd.acceptcriteria.ServerSideCriterion
creating mapping for com.vaadin.event.dd.acceptcriteria.Or
creating mapping for com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor
creating mapping for com.vaadin.ui.Tree.TargetInSubtree
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIsTarget
creating mapping for com.vaadin.ui.Table.TableDropCriterion
creating mapping for com.vaadin.event.dd.acceptcriteria.TargetDetailIs
creating mapping for com.vaadin.ui.Tree.TreeDropCriterion
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIs
creating mapping for com.vaadin.ui.AbstractSelect.AcceptItem
Done. (0seconds)
Compiling 6 permutations
Compiling permutation 0…
Process output
Compiling permutation 1…
Compiling permutation 2…
Compiling permutation 3…
Compiling permutation 4…
Compiling permutation 5…
Compile of permutations succeeded
Linking into WebContent/VAADIN/widgetsets
Link succeeded
Compilation succeeded – 84.915s

That indicates there is no problem with the compilation. If the widgets do not work (CLIENT DOES NOT CONTAIN IMPLEMENTATION…) then you are probably not using the widgetset you have compiled. Check your web.xml and make sure there is an init parameter for the servlet, something like

		<init-param>
			<description>Application widgetset</description>
			<param-name>widgetset</param-name>
			<param-value>com.example.neighbourhood.widgetset.NeighbourhoodWidgetset</param-value>
		</init-param>

EDIT: Sorry, misread the output which is missing all the Visualization classes, there should be

[code]
org.vaadin.vaadinvisualizations.AnnotatedTimeLine
org.vaadin.vaadinvisualizations.AreaChart
org.vaadin.vaadinvisualizations.AreaChartImage
org.vaadin.vaadinvisualizations.BarChart
org.vaadin.vaadinvisualizations.BarChartImage
org.vaadin.vaadinvisualizations.ColumnChart
org.vaadin.vaadinvisualizations.Gauge
org.vaadin.vaadinvisualizations.GeoMap
org.vaadin.vaadinvisualizations.ImageChart
org.vaadin.vaadinvisualizations.IntensityMap
org.vaadin.vaadinvisualizations.LineChart
org.vaadin.vaadinvisualizations.LineChartImage
org.vaadin.vaadinvisualizations.Map
org.vaadin.vaadinvisualizations.MotionChart
org.vaadin.vaadinvisualizations.OrganizationalChart
org.vaadin.vaadinvisualizations.PieChart
org.vaadin.vaadinvisualizations.PieChartImage
org.vaadin.vaadinvisualizations.ScatterChart
org.vaadin.vaadinvisualizations.SparklineImage

[/code] in the list of widgets. Works fine for me with the latest version of VisualizationsForVaadin from Directory.

I recompiled the widgetsets but I still dont see those new widgetsets. Considering it found the jar

org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset in jar:file:/Users/akulkarni/workspace/Neighbourhood/WebContent/WEB-INF/lib/VisualizationsForVaadin1.jar!/

shouldn’t it do it by default?

Sorry for more of these questions as I’m really out of ideas on why it doesnt work on my machine.

I think you should try the newest version (0.0.4) of the add-on (jar name is VisualizationsForVaadin.jar)

Shouldnt make any difference with the new or old Visualization Jar…
The only thing I can say is zip your Eclipse project and send it to me and I could see if it works on my machine.

Attaching my project. Thanks.
11311.zip (5.33 MB)

So I imported the project, clicked build widgetset, seemed to do nothing, run the app, comes up with error about the widgetset…

So all I then did was to edit the NeighbourhoodWidgetset.gwt.xml and basically replaced the widgetsetname removing some spacing so now it looks like this

    <!-- <set-property name="user.agent" value="gecko"/> -->

    
    <inherits name="org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset" />

</module>

I couldnt see any difference in the name… After doing this the widgetset recompiles, and I can run the app, all sorts of layout problems, but if I remove everything barring the Area chart and then run in debug http://localhost:8080/Neighbourhood/?debug and in the debug panel say ForceLayouts (this would be really handy if it would also tell you what the heck it had done so you could fix your code… Vaadin people are you listening :slight_smile: ) I see the AreaChart

Give it a try and see if the same fixes things for you.

I ran into the same scenario. I am developing a portlet to be used in a liferay environment.

With the two jars in the lib directory, the compilation on the Eclipse side was successful. But when the porlet is exported to the liferay environment, it just say that: "Widgetset does not contain implementation for org.vaadin.vaadinvisualizations.PieChart. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. "

I tried changing the .gwt.xml file a bit to remove the comments. But it has no effect.

Help please. I really like what visualization add on provides…

Jason

When developing portlet 2.0 portlets for Liferay, you need to copy the compiled widgetset to be served statically by the portal, and tell the portal (or portlet) to use that widgetset (portal-ext.properties). All portlets on a page must use the same widgetset, so it is strongly recommended to use a single widgetset on the portal that contains all the necessary widgets.

See also
the wiki article
about configuring Liferay for use with Vaadin.

Got it. Thanks. I did it for the other widget and it works.

Can an eclipse project support multiple portlet? Otherwise my only choice is to put all the widgets in one Set and repeat the same set in different portlet’s eclipse projects, right?

From the Eclipse point of view, there is no problem with having multiple portlets in a project - just put multiple portlet sections in your portlet.xml etc. However, this means that all the portlets are deployed together in a single WAR, and therefore have lower “isolation” level towards each other.

You could write build and deployment scripts in the project so that they generate separate WARs and keep the configuration separate, but that is quite a bit more work.

If using separate projects, not all of them would need all the widgets, but the one where you compile the shared widgetset would need them all. You could also e.g. have another project which has a build script that collects add-ons and widgets from all your portlet projects (perhaps even checking them out from version control to do this) and builds a widgetset for them.

Shared widgetsets on a portal might get easier to manage in the future.