java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings, locale es_ES

后端 未结 1 787
悲哀的现实
悲哀的现实 2021-02-07 04:14

I am trying to perform some jUnit test in one of my servlets but whenever I try to run it I obtain a ExceptionInInitializerError. I\'ve read that this error is due to an except

相关标签:
1条回答
  • 2021-02-07 05:11

    Caused by: java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings, locale es_ES

    That's the real error.

    Your running tests are missing the servlet-api dependency.

    If you're using maven make sure this dependency is in your project:

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题