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

When restarting JBoss , Java EE Application startup failed but deployed successfully

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 21.0.0.Final
    • EJB
    • None
    • Hide

      1) write an java ee aplication with this singletone bean, suppose "throwErrorConfig" is a boolean read from configuration file. 

      @Singleton(name = "BootStrap")

      @Startup

      public class BootStrap {

      @PostConstruct   

      public void boot() {

      if(throwErrorConfig){           

      LOGGER.error("################### FATAL ERROR. CAN NOT START MODULES: [{}]", e.getMessage());           

      throw new RuntimeException(e);

      }
              LOGGER.info("################### setup all startupModules [{}]", list.size());   

       }

       

      2) set throwErrorConfig to false in config file and deploy application, it must deploy successfully.

      3) set throwErrorConfig to true and restart JBoss EAP , the error will shows but the deployment will done successfully .

      Show
      1) write an java ee aplication with this singletone bean, suppose "throwErrorConfig" is a boolean read from configuration file.  @Singleton(name = "BootStrap") @Startup public class BootStrap { @PostConstruct    public void boot() { if(throwErrorConfig){            LOGGER.error("################### FATAL ERROR. CAN NOT START MODULES: [{}] ", e.getMessage());            throw new RuntimeException(e); }         LOGGER.info("################### setup all startupModules [{}] ", list.size());     }   2) set throwErrorConfig to false in config file and deploy application, it must deploy successfully. 3) set throwErrorConfig to true and restart JBoss EAP , the error will shows but the deployment will done successfully .
    • Undefined
    • ---
    • ---

      my java ee application has one singleton ejb which checks configuration in startup . if the @postConstructor Method throw runtime exception in first deployment time , the deployment process will stop but if the first deployment done successfully and I change some of my configuration which cause error in startup and restart the JBoss , server shows that runtime exception happened and my singleton bean does not start but deployment process will progress and done successfully.

      it cause some problem, because my MDB start and try to read message from MQ while the application can not respond properly. 

              tadamski@redhat.com Tomasz Adamski
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: