Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception












0















I have a spring boot application that is throwing the following:




2018-01-14 01:02:56.863 ERROR 372 --- [io-8080-exec-14] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause




The application runs and behaves as expected. I've seen the error in the logs a few times but can't seem to see why/where its happening.



There is not other information in the log about the error.



I've had a look at the logs to see what happened before and after the error occurred and everything seemed fine.



I have also turned the log level to ALL and still the no useful error message.



Any ideas why I am getting this error and how I can get my application to throw more useful errors.



What stand out from the error message is with path threw exception. I'm not sure what is.










share|improve this question



























    0















    I have a spring boot application that is throwing the following:




    2018-01-14 01:02:56.863 ERROR 372 --- [io-8080-exec-14] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause




    The application runs and behaves as expected. I've seen the error in the logs a few times but can't seem to see why/where its happening.



    There is not other information in the log about the error.



    I've had a look at the logs to see what happened before and after the error occurred and everything seemed fine.



    I have also turned the log level to ALL and still the no useful error message.



    Any ideas why I am getting this error and how I can get my application to throw more useful errors.



    What stand out from the error message is with path threw exception. I'm not sure what is.










    share|improve this question

























      0












      0








      0








      I have a spring boot application that is throwing the following:




      2018-01-14 01:02:56.863 ERROR 372 --- [io-8080-exec-14] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause




      The application runs and behaves as expected. I've seen the error in the logs a few times but can't seem to see why/where its happening.



      There is not other information in the log about the error.



      I've had a look at the logs to see what happened before and after the error occurred and everything seemed fine.



      I have also turned the log level to ALL and still the no useful error message.



      Any ideas why I am getting this error and how I can get my application to throw more useful errors.



      What stand out from the error message is with path threw exception. I'm not sure what is.










      share|improve this question














      I have a spring boot application that is throwing the following:




      2018-01-14 01:02:56.863 ERROR 372 --- [io-8080-exec-14] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause




      The application runs and behaves as expected. I've seen the error in the logs a few times but can't seem to see why/where its happening.



      There is not other information in the log about the error.



      I've had a look at the logs to see what happened before and after the error occurred and everything seemed fine.



      I have also turned the log level to ALL and still the no useful error message.



      Any ideas why I am getting this error and how I can get my application to throw more useful errors.



      What stand out from the error message is with path threw exception. I'm not sure what is.







      java spring tomcat web






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 15 '18 at 11:49









      breaktopbreaktop

      47421224




      47421224
























          2 Answers
          2






          active

          oldest

          votes


















          0















          Any ideas why I am getting this error and how I can get my application to throw more useful errors.




          The root cause is a NullPointerException (NPE) thrown at some point in the call stack of the DispatcherServlet.



          Unfortunately, you don't get a complete stacktrace of the NPE in your log. Have you checkout the standard output for the stacktrace? Normally Spring Boot is really conservative configured when it comes to swallowing stacktraces. Meaning: there should be a point where you can see the complete stacktrace. My guess: a logfile in the working directory or the standard output of the application (e.g. terminal screen).




          What stand out from the error message is with path threw exception. I'm not sure what is.




          This is the path part of the request. means the path is an empty string. Spring used the -notation to signal you that there is an empty string. Normally it would look like [/users/34].
          My guess is: you called something like http://localhost:8080 so no trailing slash is present, which renders the path part of the url to an empty string.






          share|improve this answer































            0














            I had the same issue and was able to resolve it by using another JDK.



            I switched from openjdk 8 to openjdk 9 (both ubuntu 18.04) by running



            sudo apt install default-jdk



            (check if it update your symlinks with java -version






            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%2f49298719%2fservlet-service-for-servlet-dispatcherservlet-in-context-with-path-threw%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0















              Any ideas why I am getting this error and how I can get my application to throw more useful errors.




              The root cause is a NullPointerException (NPE) thrown at some point in the call stack of the DispatcherServlet.



              Unfortunately, you don't get a complete stacktrace of the NPE in your log. Have you checkout the standard output for the stacktrace? Normally Spring Boot is really conservative configured when it comes to swallowing stacktraces. Meaning: there should be a point where you can see the complete stacktrace. My guess: a logfile in the working directory or the standard output of the application (e.g. terminal screen).




              What stand out from the error message is with path threw exception. I'm not sure what is.




              This is the path part of the request. means the path is an empty string. Spring used the -notation to signal you that there is an empty string. Normally it would look like [/users/34].
              My guess is: you called something like http://localhost:8080 so no trailing slash is present, which renders the path part of the url to an empty string.






              share|improve this answer




























                0















                Any ideas why I am getting this error and how I can get my application to throw more useful errors.




                The root cause is a NullPointerException (NPE) thrown at some point in the call stack of the DispatcherServlet.



                Unfortunately, you don't get a complete stacktrace of the NPE in your log. Have you checkout the standard output for the stacktrace? Normally Spring Boot is really conservative configured when it comes to swallowing stacktraces. Meaning: there should be a point where you can see the complete stacktrace. My guess: a logfile in the working directory or the standard output of the application (e.g. terminal screen).




                What stand out from the error message is with path threw exception. I'm not sure what is.




                This is the path part of the request. means the path is an empty string. Spring used the -notation to signal you that there is an empty string. Normally it would look like [/users/34].
                My guess is: you called something like http://localhost:8080 so no trailing slash is present, which renders the path part of the url to an empty string.






                share|improve this answer


























                  0












                  0








                  0








                  Any ideas why I am getting this error and how I can get my application to throw more useful errors.




                  The root cause is a NullPointerException (NPE) thrown at some point in the call stack of the DispatcherServlet.



                  Unfortunately, you don't get a complete stacktrace of the NPE in your log. Have you checkout the standard output for the stacktrace? Normally Spring Boot is really conservative configured when it comes to swallowing stacktraces. Meaning: there should be a point where you can see the complete stacktrace. My guess: a logfile in the working directory or the standard output of the application (e.g. terminal screen).




                  What stand out from the error message is with path threw exception. I'm not sure what is.




                  This is the path part of the request. means the path is an empty string. Spring used the -notation to signal you that there is an empty string. Normally it would look like [/users/34].
                  My guess is: you called something like http://localhost:8080 so no trailing slash is present, which renders the path part of the url to an empty string.






                  share|improve this answer














                  Any ideas why I am getting this error and how I can get my application to throw more useful errors.




                  The root cause is a NullPointerException (NPE) thrown at some point in the call stack of the DispatcherServlet.



                  Unfortunately, you don't get a complete stacktrace of the NPE in your log. Have you checkout the standard output for the stacktrace? Normally Spring Boot is really conservative configured when it comes to swallowing stacktraces. Meaning: there should be a point where you can see the complete stacktrace. My guess: a logfile in the working directory or the standard output of the application (e.g. terminal screen).




                  What stand out from the error message is with path threw exception. I'm not sure what is.




                  This is the path part of the request. means the path is an empty string. Spring used the -notation to signal you that there is an empty string. Normally it would look like [/users/34].
                  My guess is: you called something like http://localhost:8080 so no trailing slash is present, which renders the path part of the url to an empty string.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 15 '18 at 12:20









                  Johannes LeimerJohannes Leimer

                  832617




                  832617

























                      0














                      I had the same issue and was able to resolve it by using another JDK.



                      I switched from openjdk 8 to openjdk 9 (both ubuntu 18.04) by running



                      sudo apt install default-jdk



                      (check if it update your symlinks with java -version






                      share|improve this answer




























                        0














                        I had the same issue and was able to resolve it by using another JDK.



                        I switched from openjdk 8 to openjdk 9 (both ubuntu 18.04) by running



                        sudo apt install default-jdk



                        (check if it update your symlinks with java -version






                        share|improve this answer


























                          0












                          0








                          0







                          I had the same issue and was able to resolve it by using another JDK.



                          I switched from openjdk 8 to openjdk 9 (both ubuntu 18.04) by running



                          sudo apt install default-jdk



                          (check if it update your symlinks with java -version






                          share|improve this answer













                          I had the same issue and was able to resolve it by using another JDK.



                          I switched from openjdk 8 to openjdk 9 (both ubuntu 18.04) by running



                          sudo apt install default-jdk



                          (check if it update your symlinks with java -version







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 10 '18 at 16:03









                          Chris K.Chris K.

                          82469




                          82469






























                              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.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49298719%2fservlet-service-for-servlet-dispatcherservlet-in-context-with-path-threw%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

                              Florida Star v. B. J. F.

                              Danny Elfman

                              Lugert, Oklahoma