Designer Problem : « uibinder template should be in client package »

1,803 views
Skip to first unread message

HommeDeJava

unread,
Mar 28, 2011, 2:39:53 PM3/28/11
to Google Web Toolkit
Greetings folks,

I've tried to add UIBinder Composite widget in a project which was
initiated without UiBinder using GWT plugin.
So, when I tried to open xxx.ui.xml into the designer view, I've got
the error « uibinder template should be in client package »
You are attempting to use UiBinder for .../xxx.ui.xml however it is
not in Java package.

Did someone get this problem or have any idea?

Thanks

Claude


Juan Pablo Gardella

unread,
Mar 28, 2011, 2:46:43 PM3/28/11
to google-we...@googlegroups.com
I supposed that you must put the file in client package.

2011/3/28 HommeDeJava <claude....@gmail.com>


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


HommeDeJava

unread,
Mar 28, 2011, 3:08:54 PM3/28/11
to Google Web Toolkit

Hi,

> I supposed that you must put the file in client package.
>

Yes indeed I've put the myUIBinderComposite.ui.xml and
myUIBinderComposite.java files into the client package

It's when I try to use the GWT Designer opening the
myUIBinderComposite.ui.xml file using the Design Tab that I've got the
error.

Anyway, thanks for your help.

Eric Clayberg

unread,
Mar 29, 2011, 3:29:00 PM3/29/11
to Google Web Toolkit
That error message is very specific about the file being in the wrong
place.

I suppose there could be some other problem with the structure of the
project, so we would need to see a complete test case project in order
to see what the actual problem is.

m0rganic

unread,
May 10, 2011, 10:55:31 PM5/10/11
to Google Web Toolkit
I had the same exact issue.

Check your build path settings. In my case the culprit was 'm2eclipse
maven project import', it was changing a rule in my build path during
import from "src/main/resources exclude: '**/*.java'" to "src/main/
resources exclude: '**'", which was forcing eclipse environment to
ignore the gwt.xml files. The problem was only showing up when I tried
to use the gwt designer, everything else worked but that.

Hope that helps.

On Mar 28, 3:08 pm, HommeDeJava <claude.coulo...@gmail.com> wrote:

Saad

unread,
Jul 7, 2011, 6:19:47 PM7/7/11
to Google Web Toolkit
Thanks! I can verify that this build path tweak works.

cruser

unread,
Jul 12, 2011, 5:55:46 AM7/12/11
to google-we...@googlegroups.com
Sorry where check the build path settings?  I am not using maven (as far as I know) and this is still happening. Any tips for a beginner?

kojo

unread,
Jul 12, 2011, 9:04:34 AM7/12/11
to google-we...@googlegroups.com
I can confirm that the GWT maven plugin does add the exclusion "**" to build path source folder - src/main/resources. When I remove the exclusion in eclipse and update the maven configuration from eclipse, the exclusion is re-added. Perhaps changing the pom.xml file would fix this. 

@cruser find the build path settings by right clicking on your project and find 'build path > configure build path' in the context menu. 

- Kojo

cruser

unread,
Jul 13, 2011, 2:29:08 AM7/13/11
to google-we...@googlegroups.com
Thanks Kojo, 

I had a look there and all the source is included. :(
Here is a basic package layout, perhaps there is something wrong :

src--
      |
      topPackage
                     |
                     package1
                                  |
                                  client
                                  server
                     package2
                                  |
                                  client
                                         |
                                         widget
                                                  |
                                                  timewidget
                                                                 |
                                                                 TimeView.java
                                                                 TimeView.ui.xml
                                  server
                     public
                                 |
                                 images(folder)
                                 package1.css
                                 package2.css
                     package1.gwt.xml
                     package2.gwt.xml

...(referenced libraries and war directory etc)

In this example layout the TimeView.ui.xml  gives the error "uibinder template should be in client package".

Is there anything you can spot is wrong with the package layout? Is there anything that says there can be only one "client" package? When running the project everything works fine, I just can't use the designer

khiem nguyen

unread,
Jul 13, 2011, 2:41:22 PM7/13/11
to google-we...@googlegroups.com
try to move package1.gwt.xml into package1,  package2.gwt.xml into package2. i have this kind of issue too, keeping this helps:

package
    client
    server
    shared
    module.gwt.xml






--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Steve Cook

unread,
Jun 3, 2016, 8:20:16 AM6/3/16
to GWT Users, khi...@googlemail.com
This was an unacceptable solution for me as I needed to share features between modules and you cannot go up a directory.

The problem:  The UI Editor looks for a gwt.xml file, then reads it, if the file it finds does not contain the path which your UI xml file resides, it decides that it is not in the package and does not look for additional files.

My Solution 1 and 2:
I solved this by creating a "aadev.gwt.xml" that included all paths needed for all modules.  This one was not added to my compilation, but acted as a dummy so that the GWT designer would see it in the path.  My assumption is that the paths are read alphabetically, which may be a flawed assumption.

The other solution (I tried first actually) was to add that path to the module that did work (As one always works).  Assuming the gwt.xml files are close enough in configuration this should work, however if they are vastly different it may not function as desired, in which I would copy a dummy to the package path, and tweak its paths to make it work (Assuming fix 1 does not solve it for you).


To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages