最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java.lang.NoClassDefFoundError: orgapachehadoopconfConfiguration while running schematool -dbType mysql -initSchema command - St

programmeradmin2浏览0评论

when I run schematool -dbType mysql -initSchema command in command prompt it is throwing below error -

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)

when I run schematool -dbType mysql -initSchema command in command prompt it is throwing below error -

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
Share Improve this question asked 7 hours ago Anand HottiAnand Hotti 1 New contributor Anand Hotti is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • I think the answer from this thread will help you: stackoverflow.com/questions/18414151/… – Kaspars Rinkevics Commented 4 hours ago
Add a comment  | 

1 Answer 1

Reset to default 0

Verifica no Classpath se todos os JARs necessários estão incluídos Pode adicionar o caminho dos JARs do Hadoop usando a variável de ambiente HADOOP_CLASSPATH:

export HADOOP_CLASSPATH=/caminho/para/hadoop/conf:/caminho/para/hadoop/lib/*

Verifica se o Hadoop está corretamente instalado e configurado no sistema

Adiciona os JARs Necessários manualmente ao classpath, incluindo o JAR que contém a classe Configuration:

java -cp /caminho/para/hadoop/conf:/caminho/para/hadoop/lib/hadoop-common-*.jar:/caminho/para/hadoop/lib/hadoop-hdfs-*.jar:/caminho/para/hadoop/lib/hadoop-mapreduce-*.jar:/caminho/para/hadoop/lib/hadoop-yarn-*.jar org.apache.hadoop.hive.ql.tools.HiveSchemaTool -dbType mysql -initSchema

Verifica todas as dependências estão presentes e não há conflitos de versão

Se o problema persistir, reinstala o Hadoop para garantir que todos os arquivos necessários estejam presentes e configurados corretamente.

发布评论

评论列表(0)

  1. 暂无评论