2 Replies Latest reply on May 10, 2012 10:36 AM by bfluri

    Errai Project as a Multi-Module Maven Project

    bfluri

      I'm trying to split up the Errai KitchenSink project into a multi-module Maven project with

      • kitchensink-shared (client.shared with a separate GWT module)
      • kitchensink-client (client.local, inherited the shared GWT module in the KitchenSink module)
      • kitchensink-server (controller, util)
      • kitchensink-war (builds the war for deployment)

      In our team, we prefer such a split because we separate development according to this structure and we'd like to have different Jenkins Jobs for testing the modules independently.

       

      In kitchensink-client I managed to get the GWT-part compiling by using <compileSourcesArtefacts> to take kitchensink-shared into the GWT compilation. I also managed to deploy the war file including server classes and GWT compiled Javascript. The output of the JBoss AS 7 log is the same as when deploying the original (single project) KitchenSink application. Opening KitchenSink.html in the browser shows the static and the GWT related widgets but fails when communicating with the server (see screenshot). You can see in the console, that the application throws a RuntimeException.

       

      kitchen-sink-runtimeexception.png

       

      Can anybody help me in figuring out what I missed when splitting the projects into modules? What problem could cause communicate failure?

       

      Remarks:

      • If do not split KitchenSink it works perfectly
      • The REST part of KitchenSink works perfectly
      • I created the Errai KitchenSink project using the following Maven archetype command:

      mvn archetype:generate -DarchetypeGroupId=org.jboss.errai.archetypes -DarchetypeArtifactId=kitchensink-quickstart -DarchetypeVersion=2.0.0.Final -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/

      and changed the version of org.jboss.spec.jboss.javaee6 to 3.0.1.Final since the version that the archetype is requesting does not exist anymore.

        • 1. Re: Errai Project as a Multi-Module Maven Project
          csa

          Hi,

           

          What that error means is that there were no @Remote interfaces found and no proxies registered when the first RPC was attempted. The reason for this could be that your kitschensink-shared project does not have an ErraiApp.properties file. That file is required so that the classes in this module get scanned by Errai.

           

          Cheers,

          Christian

          • 2. Re: Errai Project as a Multi-Module Maven Project
            bfluri

            Thank you very much for answer. I appreciate the prompt help! It solved my issue

             

            The kitchensink-shared project didn't have an ErraiApp.properties files. I was aware of this necessity in general but I thought that it is enough when the kitchensink-client project has one...