java-samples
java-samples copied to clipboard
Can't run DriveQuickstart in a Spring Boot project
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