2 Replies Latest reply: Feb 16, 2013 6:20 PM by Michael Hirsch RSS

Compile errors in 2.2.0-Final with errai-UI

Michael Hirsch Newbie

My app uses lots of errai-ui templates.  Most of the time the template is in the same directory with the java code, but in a few cases it is in another directory.  With errai 2.1.0 it worked fine, but now with 2.2.0-final I'm getting errors like:


   Computing all possible rebind results for 'org.jboss.errai.ioc.client.BootstrapperImpl.com_termalabs_ac_client_widgets_authentication_LoginWidgetTemplateResource'

      Rebinding org.jboss.errai.ioc.client.BootstrapperImpl.com_termalabs_ac_client_widgets_authentication_LoginWidgetTemplateResource

         Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator

            Creating assignment for getContents()

               Finding resources

                  [ERROR] Resource ../../PreLoginTemplate.html not found. Is the name specified as Class.getResource() would expect?

   [ERROR] Errors in 'gen/org/jboss/errai/ioc/client/BootstrapperImpl.java'

      [ERROR] Line 857: Failed to resolve 'org.jboss.errai.ioc.client.BootstrapperImpl.com_termalabs_ac_client_widgets_authentication_LoginWidgetTemplateResource' via deferred binding

   [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)

      [WARN] org.jboss.errai.ioc.client.BootstrapperImpl_com_termalabs_ac_client_widgets_authentication_LoginWidgetTemplateResource_default_InlineClientBundleGenerator


The errors only seem to occur when the template html is not in the same directory as the java class.


Here are the appropriate lines from LoginWidget:



public class LoginWidget extends Composite implements LoginView {


Anyone know the proper format for using a Template, now?  What should I be doing?





  • 1. Re: Compile errors in 2.2.0-Final with errai-UI
    Jonathan Fuerth Master

    Hi Michael,


    I've just added a test for relative template paths that include "../" at the beginning:




    This test passed immediately, so it seems this functionality is not broken in the 3.0 branch at least. (3.0 does include all changes that went into 2.2.0.Final.)


    I notice there are a lot of "../../.." in the template path you referenced. Is it possible you've moved your template outside the GWT module that the @Templated widget is defined in? Errai UI uses GWT's resource system to include template files in the client bundle, so you do have to keep them within the GWT module they're referenced from.



  • 2. Re: Compile errors in 2.2.0-Final with errai-UI
    Michael Hirsch Newbie

    Hi Jonathan,


    Thanks for testing my guess about "../..".  I guess that is not it, but I still can't compile my code with 2.2.0.  :-(


    The problem isn't that the templates have moved.  I tested 2.2.0 just by changing a variable in my ant build.xml from 2.1.0 to 2.2.0.  It compiles fine with the former, and errors out with the latter.


    Can you think of anything else I should try?