liuxiaocs7 commented on issue #464:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/issues/464#issuecomment-1655183439

   Hi, @z7658329, I have tried to manually specify the version of 
jakarta.servlet-api as 5.0.0 or 6.0.0 instead of the default 4.0.3, and got the 
following results
   
   
   ```shell
   Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/servlet/Servlet
        at org.apache.spark.ui.SparkUI$.create(SparkUI.scala:183)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:480)
        at 
org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
        at top.liuxiaocs.Main.main(Main.java:16)
   Caused by: java.lang.ClassNotFoundException: javax.servlet.Servlet
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 4 more
   ```
   
   pom:
   
   ```xml
   <dependencies>
       <dependency>
           <groupId>org.apache.spark</groupId>
           <artifactId>spark-core_2.12</artifactId>
           <version>3.2.2</version>
           <scope>provided</scope>
           <exclusions>
               <exclusion>
                   <groupId>jakarta.servlet</groupId>
                   <artifactId>jakarta.servlet-api</artifactId>
               </exclusion>
           </exclusions>
       </dependency>
       <dependency>
           <groupId>org.apache.spark</groupId>
           <artifactId>spark-sql_2.12</artifactId>
           <version>3.2.2</version>
           <scope>provided</scope>
           <exclusions>
               <exclusion>
                   <artifactId>antlr4-runtime</artifactId>
                   <groupId>org.antlr</groupId>
               </exclusion>
           </exclusions>
       </dependency>
   
       <dependency>
           <groupId>org.apache.hugegraph</groupId>
           <artifactId>hugegraph-client</artifactId>
           <version>1.0.0</version>
           <exclusions>
               <!-- Note: jackson version should < 2.13 with scala 2.12 -->
               <exclusion>
                   <groupId>com.fasterxml.jackson.core</groupId>
                   <artifactId>*</artifactId>
               </exclusion>
               <exclusion>
                   <groupId>com.fasterxml.jackson.module</groupId>
                   <artifactId>*</artifactId>
               </exclusion>
               <exclusion>
                   <groupId>com.fasterxml.jackson.jaxrs</groupId>
                   <artifactId>*</artifactId>
               </exclusion>
           </exclusions>
       </dependency>
   
       <dependency>
           <groupId>jakarta.servlet</groupId>
           <artifactId>jakarta.servlet-api</artifactId>
           <version>5.0.0</version>
       </dependency>
   </dependencies>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to