1 Reply Latest reply on Oct 14, 2013 11:29 AM by Christian Sadilek

    Use Pojo's from external Module in Errai App

    Malte Pickhan Newbie

      Hi,

       

      I have another question regarding the usage of Errai.

       

      I divided my Project into multiple modules, to avoid to have, "One jar to rule them all".

       

      Therefore I also created an Persistence module, which should contain the POJO's and Dao's.

       

      As I created my first Endpoint in the Errai app, it was crashing due to an Marshalling Exception. I read the documentation and pointed out, that I have to use @Portable annotation in the Pojo, and have to locate the source code in the Errai App. Otherwise the GWT compiler won't recognize it....

       

      Does somebody have a clue how I could refeer to a sepperated module?

       

      Cheers,

       

      Malte

        • 1. Re: Use Pojo's from external Module in Errai App
          Christian Sadilek Master

          Hi Malte,

           

          Your persistence module needs a GWT module descriptor (a gwt.xml file) and follow the same structure as your other GWT modules (i.e. translatable classes in .client packages unless specified otherwise). It also needs an ErraiApp.properties file at the root of the classpath (i.e. src/main/java or src/main/resources). Your GWT app can then inherit from your persistence module like from any other GWT module.


          That should be all that's required.


          Cheers,

          Christian