4 Replies Latest reply on Feb 8, 2011 8:28 AM by Heiko Braun

    cdi-example issue

    Franck Garcia Newbie

      Hi there,

       

      I try to run cdi example but I run into this issue.

      Brand new to errai (and GWT) so any pointers will be appreciated.

      Thanks,

        • 1. Re: cdi-example issue
          Ralf Sigmund Newbie

          Hi Franck,

           

          got the same issue here. It was due to an old timstamped errai-common.jar from my local .m2 folder.

          Apparently maven-2 builds replace SNAPSHOT with an timestamp and maven-3 stopped doing this.

           

          So to fix this:

          1. delete ~/.m2/repository/org/jboss/errai on your developer machine
          2. mvn clean install on a fresh https://github.com/errai/errai checkout
          3. The decompiled errai-common.jar CollectionToList class should be the same as https://github.com/errai/errai/raw/ecd7e0bc82e167528f09388b49e67a6f90608165/errai-common/src/main/java/org/jboss/errai/common/client/types/handlers/collections/CollectionToList.java it was much longer in the stale artefact..
          4. build and deploy the cdi-example again

           

          Best Regards

          Ralf

          • 2. Re: cdi-example issue
            Franck Garcia Newbie

            Ralf, thanks for the explanation.As an alternative, I was able to make it work in checking out tag v1.1-beta2 that points to errai v1.1-Final.

            • 3. cdi-example issue
              Heiko Braun Master

              Yes, working with 1.1-Final is a good idea at the moment. However, I'll take a look at the serialization issue:

               

              [ERROR] 2010-12-21 12:08:23,852 [ERROR] receiver 'ClientBus' threw an exception<br/>Additional details:<br/> <table><thead style='font-weight:bold;'><tr><td>Field</td><td>Value</td></tr></thead><tbody><tr><td>PriorityProcessing</td><td>1</td></tr><tr><td>CommandType</td><td>RemoteSubscribe</td></tr><tr><td>SubjectsList</td><td>[BatchProcessor, calculator, cdi.event:Dispatcher, ServerEchoService, org.jboss.errai.cdi.client.scopes.Categories:RPC, SMTPService, org.jboss.errai.cdi.client.rpc.AccountManager:RPC, AuthorizationService, AuthenticationService, wizard, ServerBus]</td></tr><tr><td>ToSubject</td><td>ClientBus</td></tr></tbody></table>

              [ERROR] java.lang.ClassCastException:

              [ERROR] java.lang.String cannot be cast to java.util.Collection

              [ERROR]     at org.jboss.errai.common.client.types.handlers.collections.CollectionToList.getConverted(CollectionToList.java:1)

              [ERROR]     at org.jboss.errai.common.client.types.handlers.collections.CollectionToList.getConverted(CollectionToList.java:39)

              [ERROR]     at org.jboss.errai.common.client.types.handlers.collections.CollectionToList.getConverted(CollectionToList.java:1)

              [ERROR]     at org.jboss.errai.common.client.types.TypeHandlerFactory.convert(Typ

              • 4. cdi-example issue
                Heiko Braun Master

                This problem is fixed in master. However to prevent these sort of issues, make sure to run a clean build that updates all the snapshot dependencies:

                 

                mvn -U clean install