Closed sanyam-dev closed 1 year ago
Exception in thread "main" java.lang.ClassNotFoundException: Failed to find data source: xml. Please find packages at http://spark.apache.org/third-party-projects.html
this.spark = SparkSession.builder().appName(this.appName).master(this.master).getOrCreate(); Dataset<Row> ds = spark.read(). option("rootTag", "persons"). option("rowTag", "person"). format("xml"). load(testPathString);
in my pom.xml:
pom.xml
<dependency> <groupId>com.databricks</groupId> <artifactId>spark-xml_2.12</artifactId> <version>0.14.0</version> </dependency>
It isn't part of your application. I bet you didn't make a JAR that bundles its dependencies.
Exception in thread "main" java.lang.ClassNotFoundException: Failed to find data source: xml. Please find packages at http://spark.apache.org/third-party-projects.html
in my
pom.xml
: