title: Why throws only the executable JAR a white label error?
body: <p>I have a SpringBoot application and I used the Maven command <code>mvn clean package </code> to create an executable jar.
  My application works fine when I start it in IntelliJ but the jar which I start from cmd throws a white label error. The weird thing is that sometimes it works and when I reload or switch the HTML page the error pops up again.</p>
  <p>This is the only error I get:</p>
  <p><a href="https://i.stack.imgur.com/bU5lF.png" rel="nofollow noreferrer">no information where the error comes from</a></p>
  <p>My Application is not in any of the subpackages and has the annotation <code>@SpringBootApplication</code>.</p>
  <p>I used a PostgreSQL database and Bootstrap as frontend framework.</p>
  <p>The things I tried:</p>
  <ul>
  <li><code>@ComponentScan(&quot;...&quot;)</code></li>
  <li><code>@SpringBootApplication(scanBasePackages = &quot;...&quot;)</code></li>
  <li>different WLANs</li>
  <li>starting without firewall</li>
  <li>putting all classes in one subpackage</li>
  <li>different JDKs</li>
  <li>different computers</li>
  </ul>
  <p>My pom.xml looks like this:</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.5.6&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;at.test&lt;/groupId&gt;
      &lt;artifactId&gt;Test&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;Testname&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
      &lt;properties&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;
                              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
                              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
                          &lt;/exclude&gt;
                      &lt;/excludes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  <p>My log looks like this:</p>
  <pre><code>2022-08-10 13:09:05.217 DEBUG 18536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : GET &quot;/&quot;, parameters={}
  2022-08-10 13:09:05.248 DEBUG 18536 --- [nio-8080-exec-1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [ServletContext [/]]
  2022-08-10 13:09:05.264 DEBUG 18536 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler     : Resource not found
  2022-08-10 13:09:05.264 DEBUG 18536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed 404 NOT_FOUND
  2022-08-10 13:09:05.279 DEBUG 18536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : &quot;ERROR&quot; dispatch for GET &quot;/error&quot;, parameters={}
  2022-08-10 13:09:05.279 DEBUG 18536 --- [nio-8080-exec-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse)
  2022-08-10 13:09:05.358 DEBUG 18536 --- [nio-8080-exec-1] o.s.w.s.v.ContentNegotiatingViewResolver : Selected 'text/html' given [text/html, text/html;q=0.8]
  2022-08-10 13:09:05.374 DEBUG 18536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Exiting from &quot;ERROR&quot; dispatch, status 404```
  
  Has anyone solved this problem or has an idea how it can be solved? 
  I would also appreciate if somebody knows a simple alternative!!
  </code></pre>