title: The following method did not exist: disableRegistry()
body: <p>I use Spring Boot and MongoDB in my application. When starting the application, it gives the following error</p>
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  Description:
  An attempt was made to call a method that does not exist. The attempt was made from the following location:      org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:175)
  The following method did not exist:
      org.apache.tomcat.util.modeler.Registry.disableRegistry()V
  The method's class, org.apache.tomcat.util.modeler.Registry, is available from the following locations:
      jar:file:/C:/Users/djoni/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.37/tomcat-embed-core-8.5.37.jar!/org/apache/tomcat/util/modeler/Registry.class
  The class hierarchy was loaded from the following locations:
      org.apache.tomcat.util.modeler.Registry: file:/C:/Users/djoni/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.37/tomcat-embed-core-8.5.37.jar   
  </code></pre>
  <p>Action:
  Correct the classpath of your application so that it contains a single, compatible version of org.apache.tomcat.util.modeler.Registry</p>
  <p>I do not understand what exactly needs to be done.
  I assume some versions are not compatible</p>
  <p>pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &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.3.3.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;com.evghenii&lt;/groupId&gt;
      &lt;artifactId&gt;fitnesstudio&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;fitnesstudio&lt;/name&gt;
      &lt;description&gt; Spring Boot und Mongo&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;tomcat.version&gt;8.5.37&lt;/tomcat.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-mongodb&lt;/artifactId&gt;
              &lt;version&gt;2.3.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;    
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&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;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                      &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;       
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;5.4.11.Final&lt;/version&gt;
          &lt;/dependency&gt;    
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate.validator&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;6.1.2.Final&lt;/version&gt;
          &lt;/dependency&gt;            
           &lt;dependency&gt;
               &lt;groupId&gt;org.hibernate.ogm&lt;/groupId&gt;
               &lt;artifactId&gt;hibernate-ogm-mongodb&lt;/artifactId&gt;
               &lt;version&gt;5.4.0.Final&lt;/version&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;version&gt;2.3.3.RELEASE&lt;/version&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;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  <p>Application</p>
  <pre><code>@SpringBootApplication
  public class FitnesstudioApplication extends SpringBootServletInitializer {   
      public static void main(String[] args) {
          SpringApplication.run(FitnesstudioApplication.class, args);
      }
  </code></pre>
  <p>how to fix this error?</p>