4 Replies Latest reply on Feb 28, 2014 3:38 AM by Hristo Stoyanov

    needs apache commons-lang to GWT (2.6.0) compile with Errai  2.4.3.Final ?

    Steeve Beroard Newbie

      Hi all,

       

      I tried to package my project with maven but I got a GWT compilation error with StringUtils missing from commons-lang (used in JaxrsHeader class) [setup Errai 2.4.3.Final + GWT 2.6.0]

      When I added commons-lang, the project finally GWT compiled successfully. I don't see anywhere in the documentation that this library is needed, am I missing something? (I only use errai-jaxrs-client and errai-jaxrs-provider for the time being)

      Notice: The project has worked up to now locally because StringUtils is in gwt-dev.jar

       

      Thanks,

       

      Steeve


        • 1. Re: needs apache commons-lang to GWT (2.6.0) compile with Errai  2.4.3.Final ?
          Christian Sadilek Master

          Hi Steeve,

           

          Yes I noticed that as well when upgrading our Errai builds to 2.6 for testing purposes (we will stay on 2.5.1 for the time being). So, you're not missing something. We will need to add commons-lang to Errai explicitly.

           

          Cheers,

          Christian

          • 2. Re: needs apache commons-lang to GWT (2.6.0) compile with Errai  2.4.3.Final ?
            Hristo Stoyanov Master

            Christian,

            I hope getting Errai 2.4.4 and Errai 3.0 to work with GWT 2.6 and Wildfly 8 is very high on your priority list...

             

            I added explicitly commons-lang-2.6 (latest) and Guava 16.0.1 (latest) to  my Errai 2.4.3 project and it compiles fine under  GWT 2.6.0 However, when trying to deploy it,  Wildfly's CDI started complaining again (see below). Maybe JBoss 7 would have worked ... Going back to GWT 2.5.1 and removing commons-lang-2.6 ( but leaving Guava 16.0.1 and deploying to Wildfly 8) seems to work for now. Sigh.

             

            ======================================================================================

            ...

            01:26:45,958 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."s4g-web.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."s4g-web.war".WeldStartService: Failed to start service

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]

                    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

            Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Set<Service> with qualifiers @Default

              at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.gwt.thirdparty.guava.common.util.concurrent.ServiceManager(Set<Service>)

              at com.google.gwt.thirdparty.guava.common.util.concurrent.ServiceManager.<init>(ServiceManager.java:0)

             

             

                    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)

                    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)

                    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)

                    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)

                    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)

                    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)

                    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)

                    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

                    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

                    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51]

            • 3. Re: needs apache commons-lang to GWT (2.6.0) compile with Errai  2.4.3.Final ?
              Christian Sadilek Master

              Hi Hristo,

               

              You seem to be running into this GWT issue:

              https://code.google.com/p/google-web-toolkit/issues/detail?id=8590

               

              So, the gwt-servlet.jar contains classes from Guava 15 that cause CDI deployment issues. Do you need to deploy gwt-servlet? If so, the link also contains a workaround.

               

              Cheers,

              Christian

              • 4. Re: needs apache commons-lang to GWT (2.6.0) compile with Errai  2.4.3.Final ?
                Hristo Stoyanov Master

                Thanks Christian,

                Unfortunately, I do not see a way without bundling gwt-servlet.jar in my WEB-INF/lib. Therefore, I asked the GWT team in the thread above to release an emergency GWT 2.6.1 with the guava CDI mess sorted out (e.g. upgrade to guava 16.0.1). This is a killer issue for GlassFiash 4 and WIldfly 8 . The proposed workaround seems very impractical for automated builds.