java-samples icon indicating copy to clipboard operation
java-samples copied to clipboard

Can't run DriveQuickstart in a Spring Boot project

Open jfrac opened this issue 5 years ago • 0 comments

Can't run DriveQuickstart in a Spring project

Expected Behavior

DriveQuickstart executed successfully

Actual Behavior

Got the next error:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call the method javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String; but it does not exist. Its class, javax.servlet.ServletContext, is available from the following locations:

    jar:file:[...].m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar!/javax/servlet/ServletContext.class
    jar:file:[...].m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.39/tomcat-embed-core-8.5.39.jar!/javax/servlet/ServletContext.class

It was loaded from the following location:

    file:[...].m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.servlet.ServletContext

Specifications

  • Java: version 10
  • OS: Mac
  • Spring Boot: 2.0.9.RELEASE

jfrac avatar Jun 23 '20 14:06 jfrac