admin管理员组文章数量:1130349
ClassNotFoundException,某种类的缺失
写spark代码,将hive中的数据采集到hbase中,将代码提交到上述异常,是运行jar包的服务器缺少相应的类,两种解决方案:
- 使用插件,将maven中的所有的包都打入到jar包中,然后在集群中运行
<dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-assembly-plugin</artifactId><version>3.0.0</version></dependency><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs></configuration><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin>
很费时间,如果多次修改代码,不方便,
- 新开一个模块将缺少的类,打包单独放入到一个jar包中,然后放进spark中专门放依赖的目录中
ClassNotFoundException,某种类的缺失
写spark代码,将hive中的数据采集到hbase中,将代码提交到上述异常,是运行jar包的服务器缺少相应的类,两种解决方案:
- 使用插件,将maven中的所有的包都打入到jar包中,然后在集群中运行
<dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-assembly-plugin</artifactId><version>3.0.0</version></dependency><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs></configuration><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin>
很费时间,如果多次修改代码,不方便,
- 新开一个模块将缺少的类,打包单独放入到一个jar包中,然后放进spark中专门放依赖的目录中
本文标签: ClassNotFoundException某种类的缺失
版权声明:本文标题:ClassNotFoundException,某种类的缺失 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/IT/1687924476a158071.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论