0

I'm fairly new to spring and spring boot so am not 100 percent sure what i'm doing... Up until a few days ago everything was working fine with my springboot application, but now it throws this error upon starting:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.catalina.Server.setCatalinaBase(Ljava/io/File;)V

After some reading around people are saying that the version of tomcat might be outdated, but I'm not really sure where to start

Amit
  • 30,756
  • 6
  • 57
  • 88

1 Answers1

0

You need to provide us information which version of tomcat and spring boot you are using. I guess you are having problem that your spring boot version is in collision with tomcat version.(One version of spring boot cannot work with all versions of tomcat, I guess that if your application worked before then it must be that you changed, added or deleted some dependency and that is the reason why you app don't work now)

Spasoje Petronijević
  • 1,476
  • 3
  • 13
  • 27
  • Hey, my spring boot version is 1.4.3.RELEASE, but I'm unsure how to find the tomcat version? – Isaac Pasternak May 04 '17 at 10:30
  • You can find it in environment settings. The place where you defined JAVA_HOME and stuff like that. Tomcat version is called CATALINA_HOME. – Spasoje Petronijević May 04 '17 at 10:32
  • I think the version of tomcat is catalina 6.0.53 – Isaac Pasternak May 04 '17 at 10:32
  • Well your version of tomcat is really outdated, you should update it. You can find on this link https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/1.4.3.RELEASE that your spring boot 1.4.3(you can update this thing also, there is newer version) is using tomcat 8 and you are using tomcat 6. – Spasoje Petronijević May 04 '17 at 10:36
  • Thanks for your response - your answer was essentially correct. We're using another project containing code common across all of our microservices, and inside the common code project, there was another version of tomcat which was causing the conflict. – Isaac Pasternak May 15 '17 at 16:12