Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20456

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • None
    • EJB
    • None
    • False
    • False
    • Undefined
    • 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 .

    Description

      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. 

      Attachments

        Issue Links

          Activity

            People

              cfang@redhat.com Cheng Fang
              ahadi.hamide Hamide Ahadi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: