Skip deploying or stop web application if servlet context initialization fails












2














In our project, we have several Spring-based modules which are deployed on WAS as web applications. We need to skip deployment, or stop a module if its Spring context initialization fails (i.e. ContextLoaderListener#contextInitialized or DispatcherServlet#init throws an exception). Now, if such happens, app is got deployed and starts, but returns HTTP 500 for any request.



Websphere 8.5.5



Related question: https://stackoverflow.com/a/272747/3459206










share|improve this question





























    2














    In our project, we have several Spring-based modules which are deployed on WAS as web applications. We need to skip deployment, or stop a module if its Spring context initialization fails (i.e. ContextLoaderListener#contextInitialized or DispatcherServlet#init throws an exception). Now, if such happens, app is got deployed and starts, but returns HTTP 500 for any request.



    Websphere 8.5.5



    Related question: https://stackoverflow.com/a/272747/3459206










    share|improve this question



























      2












      2








      2


      1





      In our project, we have several Spring-based modules which are deployed on WAS as web applications. We need to skip deployment, or stop a module if its Spring context initialization fails (i.e. ContextLoaderListener#contextInitialized or DispatcherServlet#init throws an exception). Now, if such happens, app is got deployed and starts, but returns HTTP 500 for any request.



      Websphere 8.5.5



      Related question: https://stackoverflow.com/a/272747/3459206










      share|improve this question















      In our project, we have several Spring-based modules which are deployed on WAS as web applications. We need to skip deployment, or stop a module if its Spring context initialization fails (i.e. ContextLoaderListener#contextInitialized or DispatcherServlet#init throws an exception). Now, if such happens, app is got deployed and starts, but returns HTTP 500 for any request.



      Websphere 8.5.5



      Related question: https://stackoverflow.com/a/272747/3459206







      java servlets web-applications websphere






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 26 '18 at 14:38







      Alex Salauyou

















      asked Dec 26 '18 at 7:47









      Alex SalauyouAlex Salauyou

      11.1k43259




      11.1k43259
























          4 Answers
          4






          active

          oldest

          votes


















          2





          +100









          This APAR seems to be relevant:



          https://www-01.ibm.com/support/docview.wss?uid=swg1PI58875



          From the APAR text:



          Listener exceptions typically should not stop the application
          from starting up for service. However, some applications depend
          on their listeners to do the necessary setup before the
          application is started for service. Such applications prefer to
          stop the application from starting up when there is any
          exception in their listeners.


          Problem conclusion



          The WebContainer Container code was modified to provide an
          option to stop the application when there is any listener
          exception during the application starting up process.

          A new WebContainer custom property needs to be set to enable the
          behavior provided by this APAR:

          For Full Profiles

          com.ibm.ws.webcontainer.stopappstartuponlistenerexception = true
          (default is false)

          For Liberty Profile

          stopappstartuponlistenerexception=true

          The fix for this APAR is currently targeted for inclusion in
          WebSphere Application Server fix packs 8.5.5.11 and 9.0.0.2,
          and Liberty 16.0.0.3


          See the APAR link for additional information.






          share|improve this answer























          • Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
            – Alex Salauyou
            Jan 3 at 20:01










          • please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
            – cilap
            Jan 3 at 23:13



















          0














          You can use jenkins + maven.
          Add the part you need to check under your test like junit.
          Then if this module do not pass test, jenkins would not deploy it.



          But I prefer fix bugs before deployment






          share|improve this answer





















          • The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
            – Alex Salauyou
            Dec 29 '18 at 9:51



















          0














          Had a very similar issue.
          The thing is - webfear - sorry could not resist ;-) does not initialize everything on startup.



          To trigger a controlled request, I added a ScheduledEJB to the startup of the application. This bean itself triggered a http-request to a defined URL, which itself triggered:




          • any filters to get initialized in the chain

          • any contexts which are needed are initialized


          And this itself ensured that my application (EAR or WAR) got very quickly tested after deployment. This works well with some small amout of requests per minute



          If you work with high load, means tons of requests per second, you need to choose a different approach.
          In this case I added a polling mechanism into the @Startup of the application, which polled every second or 250ms (depends on the load of the application).
          This firing to the server ensured, that my @Startup bean was the very first which triggered the possible init issues in the application. If this happened I initialized a filter which always reported a 500 (or better fitting error) to the requestor.



          Of course stop your firing bean, as soon as you get the 500, else your admins may like to kill you. (happend to me, since I produced tons or monitoring issues ;-) )
          And of course on the regular operation, after your application started properly, you should also disable the polling






          share|improve this answer























          • And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
            – Alex Salauyou
            Jan 3 at 20:06












          • @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
            – cilap
            Jan 3 at 23:10










          • xml-configured Spring apps packaged as war-s
            – Alex Salauyou
            Jan 3 at 23:26












          • Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
            – cilap
            Jan 4 at 13:17



















          0














          Look for a try-catch in the top level of your application code that is catching the Spring exception and allowing the application to continue running.



          If the Spring exceptions being thrown are permitted to propagate to the top of the stack, the JVM will stop and there's no way it can keep running, far as I know.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53929047%2fskip-deploying-or-stop-web-application-if-servlet-context-initialization-fails%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2





            +100









            This APAR seems to be relevant:



            https://www-01.ibm.com/support/docview.wss?uid=swg1PI58875



            From the APAR text:



            Listener exceptions typically should not stop the application
            from starting up for service. However, some applications depend
            on their listeners to do the necessary setup before the
            application is started for service. Such applications prefer to
            stop the application from starting up when there is any
            exception in their listeners.


            Problem conclusion



            The WebContainer Container code was modified to provide an
            option to stop the application when there is any listener
            exception during the application starting up process.

            A new WebContainer custom property needs to be set to enable the
            behavior provided by this APAR:

            For Full Profiles

            com.ibm.ws.webcontainer.stopappstartuponlistenerexception = true
            (default is false)

            For Liberty Profile

            stopappstartuponlistenerexception=true

            The fix for this APAR is currently targeted for inclusion in
            WebSphere Application Server fix packs 8.5.5.11 and 9.0.0.2,
            and Liberty 16.0.0.3


            See the APAR link for additional information.






            share|improve this answer























            • Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
              – Alex Salauyou
              Jan 3 at 20:01










            • please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
              – cilap
              Jan 3 at 23:13
















            2





            +100









            This APAR seems to be relevant:



            https://www-01.ibm.com/support/docview.wss?uid=swg1PI58875



            From the APAR text:



            Listener exceptions typically should not stop the application
            from starting up for service. However, some applications depend
            on their listeners to do the necessary setup before the
            application is started for service. Such applications prefer to
            stop the application from starting up when there is any
            exception in their listeners.


            Problem conclusion



            The WebContainer Container code was modified to provide an
            option to stop the application when there is any listener
            exception during the application starting up process.

            A new WebContainer custom property needs to be set to enable the
            behavior provided by this APAR:

            For Full Profiles

            com.ibm.ws.webcontainer.stopappstartuponlistenerexception = true
            (default is false)

            For Liberty Profile

            stopappstartuponlistenerexception=true

            The fix for this APAR is currently targeted for inclusion in
            WebSphere Application Server fix packs 8.5.5.11 and 9.0.0.2,
            and Liberty 16.0.0.3


            See the APAR link for additional information.






            share|improve this answer























            • Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
              – Alex Salauyou
              Jan 3 at 20:01










            • please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
              – cilap
              Jan 3 at 23:13














            2





            +100







            2





            +100



            2




            +100




            This APAR seems to be relevant:



            https://www-01.ibm.com/support/docview.wss?uid=swg1PI58875



            From the APAR text:



            Listener exceptions typically should not stop the application
            from starting up for service. However, some applications depend
            on their listeners to do the necessary setup before the
            application is started for service. Such applications prefer to
            stop the application from starting up when there is any
            exception in their listeners.


            Problem conclusion



            The WebContainer Container code was modified to provide an
            option to stop the application when there is any listener
            exception during the application starting up process.

            A new WebContainer custom property needs to be set to enable the
            behavior provided by this APAR:

            For Full Profiles

            com.ibm.ws.webcontainer.stopappstartuponlistenerexception = true
            (default is false)

            For Liberty Profile

            stopappstartuponlistenerexception=true

            The fix for this APAR is currently targeted for inclusion in
            WebSphere Application Server fix packs 8.5.5.11 and 9.0.0.2,
            and Liberty 16.0.0.3


            See the APAR link for additional information.






            share|improve this answer














            This APAR seems to be relevant:



            https://www-01.ibm.com/support/docview.wss?uid=swg1PI58875



            From the APAR text:



            Listener exceptions typically should not stop the application
            from starting up for service. However, some applications depend
            on their listeners to do the necessary setup before the
            application is started for service. Such applications prefer to
            stop the application from starting up when there is any
            exception in their listeners.


            Problem conclusion



            The WebContainer Container code was modified to provide an
            option to stop the application when there is any listener
            exception during the application starting up process.

            A new WebContainer custom property needs to be set to enable the
            behavior provided by this APAR:

            For Full Profiles

            com.ibm.ws.webcontainer.stopappstartuponlistenerexception = true
            (default is false)

            For Liberty Profile

            stopappstartuponlistenerexception=true

            The fix for this APAR is currently targeted for inclusion in
            WebSphere Application Server fix packs 8.5.5.11 and 9.0.0.2,
            and Liberty 16.0.0.3


            See the APAR link for additional information.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 3 at 17:40

























            answered Jan 2 at 18:19









            Thomas BitontiThomas Bitonti

            53339




            53339












            • Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
              – Alex Salauyou
              Jan 3 at 20:01










            • please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
              – cilap
              Jan 3 at 23:13


















            • Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
              – Alex Salauyou
              Jan 3 at 20:01










            • please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
              – cilap
              Jan 3 at 23:13
















            Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
            – Alex Salauyou
            Jan 3 at 20:01




            Seems to be a solution. Have no possibility to test it right now, but I hope this will work. Many thanks!
            – Alex Salauyou
            Jan 3 at 20:01












            please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
            – cilap
            Jan 3 at 23:13




            please note, this solution is depending to your admin configurations. And if they miss it you have a missbehaving application. In bigger enterprises with a highly distributed admin team, this maybe a issue.
            – cilap
            Jan 3 at 23:13













            0














            You can use jenkins + maven.
            Add the part you need to check under your test like junit.
            Then if this module do not pass test, jenkins would not deploy it.



            But I prefer fix bugs before deployment






            share|improve this answer





















            • The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
              – Alex Salauyou
              Dec 29 '18 at 9:51
















            0














            You can use jenkins + maven.
            Add the part you need to check under your test like junit.
            Then if this module do not pass test, jenkins would not deploy it.



            But I prefer fix bugs before deployment






            share|improve this answer





















            • The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
              – Alex Salauyou
              Dec 29 '18 at 9:51














            0












            0








            0






            You can use jenkins + maven.
            Add the part you need to check under your test like junit.
            Then if this module do not pass test, jenkins would not deploy it.



            But I prefer fix bugs before deployment






            share|improve this answer












            You can use jenkins + maven.
            Add the part you need to check under your test like junit.
            Then if this module do not pass test, jenkins would not deploy it.



            But I prefer fix bugs before deployment







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 29 '18 at 8:11









            wl.GIGwl.GIG

            1313




            1313












            • The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
              – Alex Salauyou
              Dec 29 '18 at 9:51


















            • The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
              – Alex Salauyou
              Dec 29 '18 at 9:51
















            The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
            – Alex Salauyou
            Dec 29 '18 at 9:51




            The question is related to cases where on-deployment initialization depends on external modules which we cannot access during testing phase.
            – Alex Salauyou
            Dec 29 '18 at 9:51











            0














            Had a very similar issue.
            The thing is - webfear - sorry could not resist ;-) does not initialize everything on startup.



            To trigger a controlled request, I added a ScheduledEJB to the startup of the application. This bean itself triggered a http-request to a defined URL, which itself triggered:




            • any filters to get initialized in the chain

            • any contexts which are needed are initialized


            And this itself ensured that my application (EAR or WAR) got very quickly tested after deployment. This works well with some small amout of requests per minute



            If you work with high load, means tons of requests per second, you need to choose a different approach.
            In this case I added a polling mechanism into the @Startup of the application, which polled every second or 250ms (depends on the load of the application).
            This firing to the server ensured, that my @Startup bean was the very first which triggered the possible init issues in the application. If this happened I initialized a filter which always reported a 500 (or better fitting error) to the requestor.



            Of course stop your firing bean, as soon as you get the 500, else your admins may like to kill you. (happend to me, since I produced tons or monitoring issues ;-) )
            And of course on the regular operation, after your application started properly, you should also disable the polling






            share|improve this answer























            • And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
              – Alex Salauyou
              Jan 3 at 20:06












            • @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
              – cilap
              Jan 3 at 23:10










            • xml-configured Spring apps packaged as war-s
              – Alex Salauyou
              Jan 3 at 23:26












            • Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
              – cilap
              Jan 4 at 13:17
















            0














            Had a very similar issue.
            The thing is - webfear - sorry could not resist ;-) does not initialize everything on startup.



            To trigger a controlled request, I added a ScheduledEJB to the startup of the application. This bean itself triggered a http-request to a defined URL, which itself triggered:




            • any filters to get initialized in the chain

            • any contexts which are needed are initialized


            And this itself ensured that my application (EAR or WAR) got very quickly tested after deployment. This works well with some small amout of requests per minute



            If you work with high load, means tons of requests per second, you need to choose a different approach.
            In this case I added a polling mechanism into the @Startup of the application, which polled every second or 250ms (depends on the load of the application).
            This firing to the server ensured, that my @Startup bean was the very first which triggered the possible init issues in the application. If this happened I initialized a filter which always reported a 500 (or better fitting error) to the requestor.



            Of course stop your firing bean, as soon as you get the 500, else your admins may like to kill you. (happend to me, since I produced tons or monitoring issues ;-) )
            And of course on the regular operation, after your application started properly, you should also disable the polling






            share|improve this answer























            • And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
              – Alex Salauyou
              Jan 3 at 20:06












            • @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
              – cilap
              Jan 3 at 23:10










            • xml-configured Spring apps packaged as war-s
              – Alex Salauyou
              Jan 3 at 23:26












            • Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
              – cilap
              Jan 4 at 13:17














            0












            0








            0






            Had a very similar issue.
            The thing is - webfear - sorry could not resist ;-) does not initialize everything on startup.



            To trigger a controlled request, I added a ScheduledEJB to the startup of the application. This bean itself triggered a http-request to a defined URL, which itself triggered:




            • any filters to get initialized in the chain

            • any contexts which are needed are initialized


            And this itself ensured that my application (EAR or WAR) got very quickly tested after deployment. This works well with some small amout of requests per minute



            If you work with high load, means tons of requests per second, you need to choose a different approach.
            In this case I added a polling mechanism into the @Startup of the application, which polled every second or 250ms (depends on the load of the application).
            This firing to the server ensured, that my @Startup bean was the very first which triggered the possible init issues in the application. If this happened I initialized a filter which always reported a 500 (or better fitting error) to the requestor.



            Of course stop your firing bean, as soon as you get the 500, else your admins may like to kill you. (happend to me, since I produced tons or monitoring issues ;-) )
            And of course on the regular operation, after your application started properly, you should also disable the polling






            share|improve this answer














            Had a very similar issue.
            The thing is - webfear - sorry could not resist ;-) does not initialize everything on startup.



            To trigger a controlled request, I added a ScheduledEJB to the startup of the application. This bean itself triggered a http-request to a defined URL, which itself triggered:




            • any filters to get initialized in the chain

            • any contexts which are needed are initialized


            And this itself ensured that my application (EAR or WAR) got very quickly tested after deployment. This works well with some small amout of requests per minute



            If you work with high load, means tons of requests per second, you need to choose a different approach.
            In this case I added a polling mechanism into the @Startup of the application, which polled every second or 250ms (depends on the load of the application).
            This firing to the server ensured, that my @Startup bean was the very first which triggered the possible init issues in the application. If this happened I initialized a filter which always reported a 500 (or better fitting error) to the requestor.



            Of course stop your firing bean, as soon as you get the 500, else your admins may like to kill you. (happend to me, since I produced tons or monitoring issues ;-) )
            And of course on the regular operation, after your application started properly, you should also disable the polling







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 3 at 14:07

























            answered Jan 3 at 13:52









            cilapcilap

            1,090935




            1,090935












            • And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
              – Alex Salauyou
              Jan 3 at 20:06












            • @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
              – cilap
              Jan 3 at 23:10










            • xml-configured Spring apps packaged as war-s
              – Alex Salauyou
              Jan 3 at 23:26












            • Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
              – cilap
              Jan 4 at 13:17


















            • And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
              – Alex Salauyou
              Jan 3 at 20:06












            • @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
              – cilap
              Jan 3 at 23:10










            • xml-configured Spring apps packaged as war-s
              – Alex Salauyou
              Jan 3 at 23:26












            • Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
              – cilap
              Jan 4 at 13:17
















            And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
            – Alex Salauyou
            Jan 3 at 20:06






            And how the app may be stopped if it is detected to be not properly initialized? Any working solutions for Websphere?
            – Alex Salauyou
            Jan 3 at 20:06














            @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
            – cilap
            Jan 3 at 23:10




            @AlexSalauyou how did you package the application for websphere (EAR, WAR)? Need to check my exact solution, it is already some years ago. In the meanwhile I prefer to use open source containers like wildfly - if the client allows it of course.
            – cilap
            Jan 3 at 23:10












            xml-configured Spring apps packaged as war-s
            – Alex Salauyou
            Jan 3 at 23:26






            xml-configured Spring apps packaged as war-s
            – Alex Salauyou
            Jan 3 at 23:26














            Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
            – cilap
            Jan 4 at 13:17




            Sadly you cannot control from "inside" the application the undeploy of the application. Every container has a different way of handling the start/stop. Could you explain me why it is important to stop the application? Is it a web-application, or a web-service, or a backend for a desktop app?
            – cilap
            Jan 4 at 13:17











            0














            Look for a try-catch in the top level of your application code that is catching the Spring exception and allowing the application to continue running.



            If the Spring exceptions being thrown are permitted to propagate to the top of the stack, the JVM will stop and there's no way it can keep running, far as I know.






            share|improve this answer


























              0














              Look for a try-catch in the top level of your application code that is catching the Spring exception and allowing the application to continue running.



              If the Spring exceptions being thrown are permitted to propagate to the top of the stack, the JVM will stop and there's no way it can keep running, far as I know.






              share|improve this answer
























                0












                0








                0






                Look for a try-catch in the top level of your application code that is catching the Spring exception and allowing the application to continue running.



                If the Spring exceptions being thrown are permitted to propagate to the top of the stack, the JVM will stop and there's no way it can keep running, far as I know.






                share|improve this answer












                Look for a try-catch in the top level of your application code that is catching the Spring exception and allowing the application to continue running.



                If the Spring exceptions being thrown are permitted to propagate to the top of the stack, the JVM will stop and there's no way it can keep running, far as I know.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 3 at 14:15









                John FantasticoJohn Fantastico

                3187




                3187






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53929047%2fskip-deploying-or-stop-web-application-if-servlet-context-initialization-fails%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas