Error Unrendered UIDL:

I get the following error message trying to access my widget.

Client faced an unknown component type. Unrendered UIDL:

I noticed on another thread that it may have something to do with GWT versions. I am using vaadin-6.1.5.jar and have compiled with the GWT bundled in the jar file.
The jetty instance i am running under is using gwt-user-1.7.1.jar is there anything else i need in jetty classpaht or a version incompatibility

thanks /

Have now upgraded to latest vaadin version 6.2.1 and have followed release notes for 6.2 related to GWT widgetsets.
Now when compiling get the following error :

 created dir C:/eclipse/workspace/registreringsklient/registrering-war/src/main/client/java/generated/widgetset
 [java]

12-Jan-2010 14:10:51 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[java]
INFO: Widgetsets found from classpath:
[java]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:C:/vaadin-windows-6.2.1/WebContent/WEB-INF/lib/vaadin-6.2.1.jar!/
[java]
src.main.client.java.no.bibsys.authority.ui.widgetset.client.SuggestBoxWidgetSet in file://C/eclipse/workspace/registreringsklient/registrering-war
[java]
Exception in thread “main” java.lang.ClassCastException: java.net.URL cannot be cast to java.lang.Comparable
[java]
at java.util.TreeMap.put(TreeMap.java:542)
[java]
at java.util.TreeSet.add(TreeSet.java:238)
[java]
at java.util.AbstractCollection.addAll(AbstractCollection.java:305)
[java]
at java.util.TreeSet.addAll(TreeSet.java:295)
[java]
at java.util.TreeSet.(TreeSet.java:143)
[java]
at com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer.getDefaultSourceDirectory(ClassPathExplorer.java:430)
[java]
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:51)
[java]
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.main(WidgetSetBuilder.java:36)

does anyone have any ideas why this error occurs?

cheers.

I have this exact error (the stacktrace), did you find a sollution?

I get the error when trying to implement the gwt widget colorpicker example into my current project when specifying the widgetset in the pom under . If I instead let it autodetect I get the following error in the application:

“Widgetset does not contain implementation for com.s1songs.mac.web.vaadin.component.MusicPlayer. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:”

Any ideas?

Have you 1) selected widgetset in web.xml and 2) cleared browser cache?

I have the following paragraph in web.xml:

    <init-param>
        <param-name>widgetset</param-name>
        <param-value>com.s1songs.mac.gwt.MacWidgetSet</param-value>
    </init-param>

In that package I have MacWidgetSet.gwt.xml:

I really don’t have much clue what the widgetset.gwt.xml file should look like, I just used the one that was rendered from the maven archetype generation for the colorpicker example.

I suspect this is a bug in the widgetset builder but it is triggered only under certain circumstances. I was not able to reproduce it but made a fix (
#4100
). Test the latest nightly tomorrow and see if it works better.

Do you have any clue on why I get the runtime error when i use the autodetection of the widgetset? It seems that is how the colorpicker example is setup, specifying the module implicitly in the pom was only my idea of trying to solve that error (which lead to the builderror with the class cast error).

Is the guide at http://vaadin.com/book/-/page/gwt.html still valid?

The problem is clear: You are using a widgetset which for some reason does not include your custom widget. The compiler outputs a long list of widgets that will be included - is your widget (com.s1songs.mac.web.vaadin.component.MusicPlayer) included in this list?

This is valid.

No it’s not included in the list. Hm.

Where do I need to specify my widget relative to the widgetset.gwt.xml file?

as of right now my package structure looks like this:
[font=Courier New]

com.s1songs.mac.gwt / MacWidgetSet.gwt.xml
com.s1songs.mac.gwt.client.ui / GwtMusicPlayer
/ VMusicPlayer
com.s1songs.mac.web.vaadin.component / MusicPlayer

[/font]

The MusicPlayer.java widget has got the: @ClientWidget(VMusicPlayer.class) annotation.

My bad, actually it is included in the list, here is an excerpt:
[font=Courier New]

[INFO]
Compiling module com.s1songs.mac.gwt.MacWidgetSet
[INFO]
Scanning for additional dependencies: jar:file:/C:/Documents%20and%20Settings/Lars%20Hellstr÷m/.m2/repository/com/vaadin/vaadin/6.2.1/vaadin
-6.2.1.jar!/com/vaadin/terminal/gwt/client/DefaultWidgetSet.java
[INFO]
Computing all possible rebind results for ‘com.vaadin.terminal.gwt.client.WidgetMap’
[INFO]
Rebinding com.vaadin.terminal.gwt.client.WidgetMap
[INFO]
Invoking
[INFO]
Detecting Vaadin components in classpath to generate WidgetMapImpl.java …
[INFO]
Widget set will contain implementations for following components:
[INFO]
com.s1songs.mac.web.vaadin.component.MusicPlayer <— Here it is!
[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.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. (14seconds)
[INFO]
Compiling 6 permutations
[INFO]
Permutation compile succeeded
[INFO]
Linking into C:\project\workspace\mac\target\mac\VAADIN\widgetsets
[INFO]
Link succeeded
[INFO]
Compilation succeeded – 75,203s
[INFO]
[vaadin:update-widgetset {execution: default}]

[INFO]
auto discovered modules [com.s1songs.mac.gwt.MacWidgetSet]

[INFO]
Updating widgetset com.s1songs.mac.gwt.MacWidgetSet
[INFO]
establishing classpath list (scope = compile)
[ERROR]
2010-jan-26 17:27:44 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
INFO: Widgetsets found from classpath:
[ERROR]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:C:/Documents and Settings/Lars Hellstr÷m/.m2/repository/com/vaadin/vaadin/6.2.1/v
aadin-6.2.1.jar!/
[ERROR]
com.s1songs.mac.gwt.MacWidgetSet in file://C/project/workspace/mac/src/main/java

[/font]
I’m not sure what to make of the errors at the bottom, the build results in a success but I get the runtime error mentioned earlier.

What does the build errors imply? I’m really puzzled.

These are not really errors.

What happens is that ClassPathExplorer outputs messages to a Logger using the info level.
In turn, this info level (as well as warning and error levels) for the logger is configured to go to System.err, whereas lower levels go to System.out .

Your build system (Maven?) then captures the output and flags each line with [ERROR]
or [INFO]
depending on the stream they come from.

Ah, that figures, thanks for pointing that out!

The question is then how it is possible to get the runtime error:
[font=Courier New]
Widgetset does not contain implementation for com.s1songs.mac.web.vaadin.component.MusicPlayer. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL

[/font]
When the build claims that the widget is available:
[font=Courier New]
[INFO]
Computing all possible rebind results for ‘com.vaadin.terminal.gwt.client.WidgetMap’
[INFO]
Rebinding com.vaadin.terminal.gwt.client.WidgetMap
[INFO]
Invoking
[INFO]
Detecting Vaadin components in classpath to generate WidgetMapImpl.java …
[INFO]
Widget set will contain implementations for following components:
[INFO]
com.s1songs.mac.web.vaadin.component.MusicPlayer
[INFO]
com.vaadin.ui.AbsoluteLayout
[INFO]
com.vaadin.ui.Accordion
[INFO]
com.vaadin.ui.Button
[INFO]
com.vaadin.ui.CheckBox

[/font]
I’m quite convinced it’s something easy, I am new to this and most likely have done some stupid error.

Hi,

One possibility is that your deployment is not in sync with your project
I’ve found that especiallt tomcat is quite prone to getting out of sync with eclipse, so if you’re using eclipse and ‘run on server’, try “Clean” and “Clean tomcat work directory”, refresh the whole project, and redeploy.

Another possibility is that you’re somehow referencing the wrong widgetset in web.xml.

Of course these are just guesses, but of the been-there-done-that-will-do-it-again kind, so it’s worth a shot.

Best Regards,
Marc

Hi,

Is there any final solution to this problem? I’m stuck with the same error and checked everything mentioned here:

  1. The client implementation class
  2. web.xml referencing the right widgetset
  3. the .gwt.xml file being there and having the correct content
  4. The content of the deployed portlet and the widgetset in it on the server.
    (5. kept on clearing the cache of the browser)

All seems to be in order. Do you have any suggestion where should I look closer? Is there any way - e.g. logging or debugging - to check where the widget set is being searched for: what files are exactly looked for and where when the widgetset is being tried to load?

Hi,

Just an update to my previous post:

  • I’m using Eclipse for development
  • I’m using vaadin 6.2.6
  • I’m trying to use the widget in a portlet 1.0 (old)

Creating a default widget for an empty portlet doesn’t work either.
Since I haven’t touched anything - except inserting code into the init method of the Application class that creates the widget and adds it as a component to the main window - I cannot think of any error in the deployment / config files or code.

Steps:

  • First I created a vaadin project, deployment configuration was set to old portlet (portlet 1.0)
  • Then I created a vaadin widget inside the above mentioned portlet project
  • I modified the init method of the Application class to create the widget and added it to the main window
  • Deployed the portlet to liferay
  • Got the error message in the portlet:

Widgetset does not contain implementation for com.example.colorpicker.ColorPicker. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:
com.example.colorpicker.ColorPicker(NO CLIENT IMPLEMENTATION FOUND) id=PID6 clicks=0 message=Click here.

(I wanted to use the ColorPicker example, but first checked if the initial project creation was all right - it was not)
Thanks,
Br Miklos

One more thing came to my mind: could this problem be due to some system / liferay level configuration problem? Do I need to set / enable the usage of custom widgetset out side of my portlet? Is it possible that simply deploying the portlet with the widgetset included is not enough?

Br,
Miklos

With Portlet 1.0 it is recommended (and with Portlet 2.0 required) that the widgetset is deployed in a shared directory on the portal. Maybe it would be a good idea to try such a configuration.

Due to some GWT restrictions, each portal page can only use one widgetset, so it is strongly recommended that you build a widgetset containing all the components any of your portlets need, and deploy it in a shared location.

See [url=http://www.liferay.com/community/wiki/-/wiki/Main/Developing+Vaadin+Applications+as+Liferay+Portlets]

[/url] for instructions on how to install the shared resources (in webapps/ROOT/html/VAADIN) and set up portal-ext.properties to use them from there, with one widgetset and one (base) theme for all Vaadin portlets on the portal. These will be pre-configured in Liferay 6.0.

Note also that each portlet can define additional theme rules that are overlaid on top of the shared theme, but these affect all portlets on the page - you should use specific enough rules in your themes.

Hi Henry!

Thank you very much for your help!

I copied the directory under the widgetset directory of the custom widgetset into
\tomcat-6.0.18\webapps\ROOT\html\VAADIN\widgetsets\

and done the following change to
\tomcat-6.0.18\webapps\ROOT\WEB-INF\classes\portal-ext.properties

commented out the line:
#vaadin.widgetset=com.vaadin.portal.gwt.PortalDefaultWidgetSet

and inserted the line:
vaadin.widgetset=qualified.name.of.my.CustomWidgetset

And now it works fine!

Thanks again!

Br,
Miklos