Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9443

Random deploy error with @Startup @Singleton EJB


    • Steps to Reproduce:
      • Use provided app
      • Deploy to Wildfly 11 CR1
      • If success, deploy again and so on until it fails (should not be more than 5 or 6 times)
    • Release Notes Text:
      Packaging error.


      Simple EAR project with an EJB Module and a WAR Module. War uses Vaadin (think is not relevant but mention it anyway). On the EJB Module I have a @Singleton @Startup bean which has injected a@LocalBean @Stateless bean via @Inject annotation (tested with @EJB annotation with same results). The UI on the WAR side also calls this @LocalBean @Stateless bean. Randomly, when I deploy, redeploy or restart the server, the EAR refuses to deploy do java.lang.IllegalStateException because it cannot inject the @Stateless bean inside the @Startup bean.

      Attached sample app, project, log with error and log with success.

      If you check the success log, you will see the @Startup @Singleton bean gets instanciated twice.. Quite strange.

      Also, this didnt happened with Wildfly 9 (same app deployed perfectly)

        Gliffy Diagrams


          1. error.log
            95 kB
          2. success.log
            178 kB
          3. wftest.tar.gz
            287 kB
          4. wftest-ear-0.1.0.ear.tar.gz
            12.08 MB



              • Assignee:
                mkouba Martin Kouba
                jmrunge Juan Martin Runge
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: