2 Replies Latest reply on Jan 10, 2014 7:53 PM by Hristo Stoyanov

    Errai 2.4.3 and WIldfly 8.0.0.CR1 issues

    Hristo Stoyanov Master

      Hi all,

      I wanted to try the newly released Wildfly 8CR1  with my errai project (whoch works with JBoss 7 fine) and it did not deploy (see exception at the bottom)? Jonathan and I talked before about Weld in wildfly being a lot stricter, here is another issue that could be a result of that. Ani ideas? Here is my compile dependencies (I use Gradle for builds) , where you can see I do reference errai-cordova:


      //Project properties

      project.ext {

          erraiVersion = "2.4.3.Final"

          warDir = "${project.buildDir}/war"

          webInfDir = "${project.warDir}/WEB-INF" 9

          webLibDir = "${project.webInfDir}/lib"

          webClassesDir = "${project.webInfDir}/classes"

          webResourcesDir = "${project.webInfDir}/resources"

          gwtExtraDir = "${project.buildDir}/extra"

          deployedWarDir = "${wildfly_root}/standalone/deployments/${project.name}.war"

          moduleName = "com.docitt.web.WebApp"




      apply plugin: "war"

      apply plugin: "eclipse-wtp"



      //Override Java plugin defaults

      sourceSets.main.output.classesDir = file("${project.webClassesDir}")

      sourceSets.main.output.resourcesDir = file("${project.webClassesDir}")



      configurations { gwtProvidedCompile }





      dependencies {



          //Java EE

          providedCompile "javax:javaee-api:7.0"



          //compile 'com.google.guava:guava:15.0'



          compile fileTree (dir: gwt_sdk_root, includes:["gwt-servlet.jar"])

          //gwtProvidedCompile fileTree (dir: gwt_sdk_root, includes: ["**/*.jar"])

          gwtProvidedCompile fileTree (dir: gwt_sdk_root, includes: ["gwt-dev.jar", "gwt-user.jar", "validation-api*.jar"])



      //    compile "org.jboss.errai:errai-javaee-all:2.4.1.Final"

          compile "org.jboss.errai:errai-bus:"+project.erraiVersion

          compile "org.jboss.errai:errai-ioc:"+project.erraiVersion

          compile "org.jboss.errai:errai-cdi-client:"+project.erraiVersion

          compile "org.jboss.errai:errai-jpa-datasync:"+project.erraiVersion

          compile "org.jboss.errai:errai-jaxrs-provider:"+project.erraiVersion

          compile "org.jboss.errai:errai-javax-enterprise:"+project.erraiVersion

          compile "org.jboss.errai:errai-weld-integration:"+project.erraiVersion

          compile "org.jboss.errai:errai-ui:"+project.erraiVersion

          compile "org.jboss.errai:errai-navigation:"+project.erraiVersion

         compile "org.jboss.errai:errai-cordova:"+project.erraiVersion

          compile "org.jboss.errai:errai-marshalling:"+project.erraiVersion

          compile "org.jboss.errai:errai-jboss-as-support:"+project.erraiVersion







      16:27:41,883 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."docitt-web.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."docitt-web.war".WeldStartService: Failed to start service

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

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

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

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

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

        at injection point [BackedAnnotatedField] @Inject org.jboss.errai.ui.cordova.CordovaProducer.ballot

        at org.jboss.errai.ui.cordova.CordovaProducer.ballot(CordovaProducer.java:0)



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

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

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

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

        • 1. Re: Errai 2.4.3 and WIldfly 8.0.0.CR1 issues
          Jonathan Fuerth Master

          Hi Hristo,


          The InitBallot<?> class is packaged in the errai-ioc module, and I think it's meant to be part of the client-side-only API. You probably shouldn't have it in your .war. And CordovaProducer is definitely a client-side-only type. Somehow, Weld must now be picking it up CordovaProducer as a CDI bean; I guess it wasn't before.


          Probably the best solution would be to keep the jar containing the CordovaProducer class out of your .war file.


          Hope that helps,


          1 of 1 people found this helpful
          • 2. Re: Errai 2.4.3 and WIldfly 8.0.0.CR1 issues
            Hristo Stoyanov Master

            Thanks Jonathan,

            Maybe it is better to finally document the Errai JARs and what they are used for (GWT compile, JavaC compile, both). I have been combing the Maven poms to glean such dependencies, and it is not a solid approach. This would help developers not using the Maven plug-in.


            With  the cordova dependency fixed, I bumped into two old trouble-makers in Wildfly 8 CR1  - Guava and Weld. We discussed them previously when I tried WildFly 8 Beta.

            Current status:

            1. The Weld team recognized they were  overdoing it with some annotations, so there is a fix scheduled for early March. Not sure how quickly it will trickle down to WidlFfy builds though.

            2. Guava team decided they wanted nothing to do with CDI, so the next release, 16 should be CDI-free. Currently  version 16 is in RC1 status. Maybe you can use this one in Errai?


            So, based on your previous suggestion, I tried to downgrade the Guava version to version 13. Unfortunately, errai modules still bring in the newer version ... I might have to try harder.


            Is anyone testing Errai with WildFly 8 and if so, do you have a quick list of fixes needed to get an errai app up and running?