3 Replies Latest reply on Mar 13, 2013 10:49 AM by Christian Sadilek

    Errai 2.2.0 failure to find template files

    Michael Hirsch Newbie

      I mentioned this before, but now I have a simple example.


      I have errai-ui-demo which compiles fine with maven and errai-2.1.0.  When I move the template file and recompile with errai-2.1.0 it still works.  But when I recompile with errai-2.2.0 it fails.  It also fails to build with errai-2.2.1-SNAPSHOT.


      How to reproduce.

      1. check out errai-ui-demo
      2. build and compile.  All should be okay.
      3. move (or copy) the file App.html from src/main/java/org/jboss/errai/ui/demo/client/local/App.html  to src/main/java/org/jboss/errai/ui/demo/client/App.html.  In other words, move it up to the parent directory.
      4. clean and compile.  All should be okay.
      5. Change the pom.xml file to use errai-2.2.0 or 2.2.1-SNAPSHOT.
      6. clean and compile.  You will see this error:

      [INFO]                   Finding resources

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

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

      [INFO]          [WARN] org.jboss.errai.ioc.client.BootstrapperImpl_org_jboss_errai_ui_demo_client_local_AppTemplateResource_default_InlineClientBundleGenerator

      [INFO]    [ERROR] Errors in '/home/mhirsch/Dev/errai-ui-demo/target/.generated/org/jboss/errai/ioc/client/BootstrapperImpl.java'

      [INFO]       [ERROR] Line 328:  Failed to resolve 'org.jboss.errai.ioc.client.BootstrapperImpl.org_jboss_errai_ui_demo_client_local_AppTemplateResource' via deferred binding

      [INFO]    [ERROR] Cannot proceed due to previous errors


      This is completely reproducible for me and I would love to know how to fix it.  Some of our templates are used by more than one class and cannot be in the same directory.  This has been a show-stopper in adopting the current errai release.


      BTW, the new errai plugin for intellij believes that the template is there, even though errai does not.