ElasticSearch6在IntellijIDEA中设置JavaHell错误

时间:2017-01-23 03:25:18

标签: elasticsearch intellij-idea

使用参数-d(To daemonize)运行ElasticSearch时,我得到一个异常:

[ERROR][o.e.b.Bootstrap          ] Exception
java.lang.IllegalStateException: jar hell!
class: org.apache.hadoop.yarn.factories.package-info
jar1: /home/mightguy/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-yarn-api/2.7.1/91840e1f4f0caec10aad4d460470a98db6a4cbe8/hadoop-yarn-api-2.7.1.jar
jar2: /home/mightguy/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-yarn-common/2.7.1/d6412e04f64f191bde1467c0662f1f014ac5dc85/hadoop-yarn-common-2.7.1.jar

我的VM变量如下:

> -Xms256m
> -Des.path.home=/home/mightguy/Dev/elasticsearch/core/
> -Dlog4j2.disable.jmx=true

我已经从

复制了配置文件夹
  

/ distribution / src / main / resources / config / To core

1 个答案:

答案 0 :(得分:1)

Intellij 中运行时,应尝试删除 jar地狱依赖项。尝试直接删除这些依赖项:

rm /home/mightguy/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-yarn-api/2.7.1/91840e1f4f0caec10aad4d460470a98db6a4cbe8/hadoop-yarn-api-2.7.1.jar
rm /home/mightguy/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-yarn-common/2.7.1/d6412e04f64f191bde1467c0662f1f014ac5dc85/hadoop-yarn-common-2.7.1.jar