sparksql read hdfs Exception(sparksql read hdfs Exception)

问题一:Exception in thread “Thread-2” java.lang.NoClassDefFoundError: org/codehaus/janino/InternalCompilerException

<dependency>
   <groupId>org.apache.spark</groupId>
   <artifactId>spark-sql_2.12</artifactId>
   <version>3.2.0</version>
   <scope>provided</scope>      
</dependency>

随spark-sql依赖引进的janino版本是3.1.6,这个版本好像太高了,重新引进低版本解决

<dependency>
   <groupId>org.codehaus.janino</groupId>
   <artifactId>commons-compiler</artifactId>
   <version>3.0.8</version>
</dependency>
<dependency>
   <groupId>org.codehaus.janino</groupId>
   <artifactId>janino</artifactId>
   <version>3.0.8</version>
</dependency>
————————

问题一:Exception in thread “Thread-2” java.lang.NoClassDefFoundError: org/codehaus/janino/InternalCompilerException

<dependency>
   <groupId>org.apache.spark</groupId>
   <artifactId>spark-sql_2.12</artifactId>
   <version>3.2.0</version>
   <scope>provided</scope>      
</dependency>

The janino version introduced with spark SQL dependency is 3.1.6. It seems that this version is too high. The lower version is introduced again

<dependency>
   <groupId>org.codehaus.janino</groupId>
   <artifactId>commons-compiler</artifactId>
   <version>3.0.8</version>
</dependency>
<dependency>
   <groupId>org.codehaus.janino</groupId>
   <artifactId>janino</artifactId>
   <version>3.0.8</version>
</dependency>