Intellij - 无法启动maven服务 - ExecutionException

时间:2014-11-05 10:05:51

标签: maven intellij-idea maven-3 intellij-13

我在Ubuntu 14.0.4(amd64),Maven 3.0.5,Java Oracle 1.7.0_72上使用Intellij 13.1.5

我注意到在使用Intellij时maven存在一些不规则性,即在模块或外部库中列表中没有反映的依赖项被添加和删除。

然后当我从shell运行Intellij时,我看到了这个异常:

[  14649]   WARN -      #org.jetbrains.idea.maven - Cannot open index /home/sbotting/.IntelliJIdea13/system/Maven/Indices/Index0 
org.jetbrains.idea.maven.indices.MavenIndexException: Cannot open index /home/sbotting/.IntelliJIdea13/system/Maven/Indices/Index0
   at org.jetbrains.idea.maven.indices.MavenIndex.open(MavenIndex.java:164)
   at org.jetbrains.idea.maven.indices.MavenIndex.<init>(MavenIndex.java:139)
   at org.jetbrains.idea.maven.indices.MavenIndices.load(MavenIndices.java:59)
   at org.jetbrains.idea.maven.indices.MavenIndices.<init>(MavenIndices.java:47)
   at org.jetbrains.idea.maven.indices.MavenIndicesManager.ensureInitialized(MavenIndicesManager.java:107)
   at org.jetbrains.idea.maven.indices.MavenIndicesManager.getIndicesObject(MavenIndicesManager.java:91)
   at org.jetbrains.idea.maven.indices.MavenIndicesManager.ensureIndicesExist(MavenIndicesManager.java:164)
   at org.jetbrains.idea.maven.indices.MavenProjectIndicesManager$3.run(MavenProjectIndicesManager.java:120)
   at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
   at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
   at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
   at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
   at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
   at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
   at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
   at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298)
   at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295)
   at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110)
   at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
   at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107)
   at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104)
   at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215)
   at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
   at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212)
   at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:745)
   at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.lang.RuntimeException: Cannot reconnect.
   at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:111)
   at org.jetbrains.idea.maven.server.MavenIndexerWrapper.createIndex(MavenIndexerWrapper.java:61)
   at org.jetbrains.idea.maven.indices.MavenIndex.createContext(MavenIndex.java:305)
   at org.jetbrains.idea.maven.indices.MavenIndex.access$500(MavenIndex.java:40)
   at org.jetbrains.idea.maven.indices.MavenIndex$IndexData.<init>(MavenIndex.java:611)
   at org.jetbrains.idea.maven.indices.MavenIndex.doOpen(MavenIndex.java:185)
   at org.jetbrains.idea.maven.indices.MavenIndex.open(MavenIndex.java:161)
   ... 33 more
Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is: 
   com.intellij.execution.ExecutionException:     -Xmixed           mixed mode execution (default)
   -Xint             interpreted mode execution only
   -Xbootclasspath:<directories and zip/jar files separated by :>
                     set search path for bootstrap classes and resources
   -Xbootclasspath/a:<directories and zip/jar files separated by :>
                     append to end of bootstrap class path
   -Xbootclasspath/p:<directories and zip/jar files separated by :>
                     prepend in front of bootstrap class path
   -Xdiag            show additional diagnostic messages
   -Xnoclassgc       disable class garbage collection
   -Xincgc           enable incremental garbage collection
   -Xloggc:<file>    log GC status to a file with time stamps
   -Xbatch           disable background compilation
   -Xms<size>        set initial Java heap size
   -Xmx<size>        set maximum Java heap size
   -Xss<size>        set java thread stack size
   -Xprof            output cpu profiling data
   -Xfuture          enable strictest checks, anticipating future default
   -Xrs              reduce use of OS signals by Java/VM (see documentation)
   -Xcheck:jni       perform additional checks for JNI functions
   -Xshare:off       do not attempt to use shared class data
   -Xshare:auto      use shared class data if possible (default)
   -Xshare:on        require using shared class data, otherwise fail.
   -XshowSettings    show all settings and continue
   -XshowSettings:all
                     show all settings and continue
   -XshowSettings:vm show all vm related settings and continue
   -XshowSettings:properties
                     show all property settings and continue
   -XshowSettings:locale
                     show all locale related settings and continue
The -X options are non-standard and subject to change without notice
   at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:124)
   at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:65)
   at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
   at org.jetbrains.idea.maven.server.MavenServerManager$5.create(MavenServerManager.java:387)
   at org.jetbrains.idea.maven.server.MavenServerManager$5.create(MavenServerManager.java:383)
   at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
   at org.jetbrains.idea.maven.server.MavenIndexerWrapper.getRemoteId(MavenIndexerWrapper.java:159)
   at org.jetbrains.idea.maven.server.MavenIndexerWrapper.access$100(MavenIndexerWrapper.java:37)
   at org.jetbrains.idea.maven.server.MavenIndexerWrapper$1.execute(MavenIndexerWrapper.java:64)
   at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:105)
   ... 39 more
Caused by: com.intellij.execution.ExecutionException:     -Xmixed           mixed mode execution (default)
   -Xint             interpreted mode execution only
   -Xbootclasspath:<directories and zip/jar files separated by :>
                     set search path for bootstrap classes and resources
   -Xbootclasspath/a:<directories and zip/jar files separated by :>
                     append to end of bootstrap class path
   -Xbootclasspath/p:<directories and zip/jar files separated by :>
                     prepend in front of bootstrap class path
   -Xdiag            show additional diagnostic messages
   -Xnoclassgc       disable class garbage collection
   -Xincgc           enable incremental garbage collection
   -Xloggc:<file>    log GC status to a file with time stamps
   -Xbatch           disable background compilation
   -Xms<size>        set initial Java heap size
   -Xmx<size>        set maximum Java heap size
   -Xss<size>        set java thread stack size
   -Xprof            output cpu profiling data
   -Xfuture          enable strictest checks, anticipating future default
   -Xrs              reduce use of OS signals by Java/VM (see documentation)
   -Xcheck:jni       perform additional checks for JNI functions
   -Xshare:off       do not attempt to use shared class data
   -Xshare:auto      use shared class data if possible (default)
   -Xshare:on        require using shared class data, otherwise fail.
   -XshowSettings    show all settings and continue
   -XshowSettings:all
                     show all settings and continue
   -XshowSettings:vm show all vm related settings and continue
   -XshowSettings:properties
                     show all property settings and continue
   -XshowSettings:locale
                     show all locale related settings and continue
The -X options are non-standard and subject to change without notice.
   at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:142)
   at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:121)
   ... 48 more

我试过删除〜/ .IntelliJIdea13 / system / Maven / 没有结果

我的M2_HOME已正确设置为/ usr / share / maven

我认为解决方案在于找到ExecutionException的根本原因,尽管诊断并没有真正帮助解决这个问题。

我已经尝试恢复到Intellij 12.0.4并且它工作正常(就Maven而言 - 尽管可悲的是它并不支持svn 1.8)

输出似乎来自java -X命令,它可以打印出所有-X选项

有什么建议吗?

5 个答案:

答案 0 :(得分:17)

我突然遇到这个问题(在更新+ Windows Update之后)。我尝试了很多东西,最后设置了Settings&gt;构建,执行,部署&gt;构建工具&gt; Maven&gt;导入&gt; JDK for Importer使用JAVA_HOME(我已将其设置为指向JDK安装的env var)。这似乎有效。

答案 1 :(得分:2)

转到文件并从菜单结构中选择项目。 然后从JDK列表中更改JDK版本。 enter image description here

答案 2 :(得分:0)

在设置&gt; Maven&gt;导入框中导入&#34;导入程序的VM选项:&#34;我有-Xmx512m -X

的盒子

出于某种原因,有一个松散的-X我删除了它,现在一切正常。

答案 3 :(得分:0)

我的主机文件缺少该行:

127.0.0.1   localhost

导致这个问题。

答案 4 :(得分:0)

我遇到了这个问题,这是由于我更改了要在Intellij中导入的JDK

我将其从使用内部JRE更改为Java 1.8.0_74

我将其改回使用intellij的Internal JRE,它起作用了。

不需要更改我的.m2设置