• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Apache Spark with Spring boot – failed to start exception Factory method ‘javaSparkContext’ threw exception with message: javax/servlet/Servlet

Resolved: Apache Spark with Spring boot – failed to start exception Factory method ‘javaSparkContext’ threw exception with message: javax/servlet/Servlet

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Apache Spark with Spring boot – failed to start exception Factory method ‘javaSparkContext’ threw exception with message: javax/servlet/Servlet

Question:

I am setting up Spring boot 3.0.4 with apache spark version 3.3.2 with Java 17. however container failed to start with following exception
I tried adding javax.servlet to pom file, however it did not work. Am I missing anything here?
Here is my pom.xml file
I have created this project on github if any one wants to review it.
Github Repo

Best Answer:

Spring Boot 3.0 requires version 5.0 of the Servlet API which moved the classes from javax.servlet to jakarta.servlet. To use Spark with Spring Boot 3.0, you’ll have to use a Servlet 5.0-compatible version of Spark (if one exists). Alternatively, you could use Spring Boot 2.7.x with your current version of Spark.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

apache-spark java-17 spring-boot
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.