3 Replies Latest reply on Jul 8, 2012 5:40 PM by mcasperson

    Compile error implementing MVP in 2.1-SNAPSHOT

    mcasperson

      When compiling a simple MVP project (which was pretty much copied from http://errai-blog.blogspot.com.au/2012/03/large-scale-application-development.html), I get the following error. The code will work ok in debug mode though.

       

         [ERROR] Errors in 'jar:file:/home/matthew/.m2/repository/org/jboss/errai/errai-cdi-client/2.1-SNAPSHOT/errai-cdi-client-2.1-SNAPSHOT.jar!/org/jboss/errai/enterprise/client/cdi/EventProvider.java'

            [ERROR] Line 44:  The type new Event<Object>(){} must implement the inherited abstract method Event<Object>.select(TypeLiteral<U>, Annotation...)

         [ERROR] Errors in 'jar:file:/home/matthew/.m2/repository/org/jboss/errai/errai-cdi-client/2.1-SNAPSHOT/errai-cdi-client-2.1-SNAPSHOT.jar!/org/jboss/errai/enterprise/client/cdi/InstanceProvider.java'

            [ERROR] Line 50:  The type InstanceProvider.InstanceImpl<U> must implement the inherited abstract method Instance<Object>.select(TypeLiteral<U>, Annotation...)

        • 1. Re: Compile error implementing MVP in 2.1-SNAPSHOT
          csa

          Hi Matthew,

           

          I just cloned the example repository from the blog (https://github.com/csadilek/errai-mvp-demo), updated the version to 2.1 and it built fine. The two classes that cause problems for you should have been overwritten by our errai-javax-enterprise project which takes away those methods.

           

          The maven dependency for this project (overriding the EE6 APIs) is:

          <groupId>org.jboss.errai</groupId>

          <artifactId>errai-javax-enterprise</artifactId>

              

          This jar has to be on your classpath during compilation. For some reason when you build your project the original EE6 APIs are found first. Are there any modification you did to the pom?

           

          Cheers,

          Christian

          • 2. Re: Compile error implementing MVP in 2.1-SNAPSHOT
            mcasperson

            Ah, that probably explains it. The code was copied from the blog post and sample app, but the POM was a case of "copy and paste the differences until it worked". I'll see if your suggestion fixes the issue on Monday.

            • 3. Re: Compile error implementing MVP in 2.1-SNAPSHOT
              mcasperson

              For anyone else with the same error, this can be fixed by adding

               

              <inherits name="org.jboss.errai.enterprise.CDI"/>

               

              to the App.gwt.xml file.