I have Spark running locally in Docker. Port 7077 is exposed and I'm able to hit the WebUI at localhost:9090.
I try connecting with the following code from java:
SparkSession spark = SparkSession
.builder()
.master("spark://localhost:7077")
.appName("foo")
.getOrCreate();
But when I run the application, I get this error:
Caused by: javax.servlet.UnavailableException: Servlet class org.glassfish.jersey.servlet.ServletContainer is not a javax.servlet.Servlet
Why is this error happening and how do I fix it?