【Intelij Idea问题】IDEA报unable to import maven project see logs for details

文章目录

      • 具体问题:
      • 问题分析
      • 问题处理
      • 启示

具体问题:

新增maven项目,添加springboot相关的配置信息后Idea报错:IDEA报unable to import maven project see logs for details

问题分析

搜索全网,可以进入Help -> show Log in Finder查看(windows电脑为Help -> show Log in Explorer),查看具体日志信息。
详细报错信息为:

2019-09-26 16:06:05,055 [81433599]  ERROR -      #org.jetbrains.idea.maven - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
	at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
	at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:404)
	at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:399)
	at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:108)
	at org.jetbrains.idea.maven.project.MavenProjectReader.access$300(MavenProjectReader.java:51)
	at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:453)
	at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:429)
	at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.processRepositoryParent(MavenParentProjectFileProcessor.java:84)
	at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.process(MavenParentProjectFileProcessor.java:62)
	at org.jetbrains.idea.maven.project.MavenProjectReader.resolveInheritance(MavenProjectReader.java:456)
	at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:105)
	at org.jetbrains.idea.maven.project.MavenProjectReader.access$300(MavenProjectReader.java:51)
	at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:453)
	at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:429)
	at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.processRepositoryParent(MavenParentProjectFileProcessor.java:84)
	at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.process(MavenParentProjectFileProcessor.java:62)
	at org.jetbrains.idea.maven.project.MavenProjectReader.resolveInheritance(MavenProjectReader.java:456)
	at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:105)
	at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:67)
	at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:665)
	at org.jetbrains.idea.maven.project.MavenProjectsTree.doUpdate(MavenProjectsTree.java:555)
	at org.jetbrains.idea.maven.project.MavenProjectsTree.doAdd(MavenProjectsTree.java:500)
	at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:461)
	at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:443)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessorReadingTask.perform(MavenProjectsProcessorReadingTask.java:65)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:135)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:109)
	at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:458)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.rmi.ConnectIOException: non-JRMP server at remote endpoint
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:248)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
	at com.sun.proxy.$Proxy96.set(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor1049.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:175)
	at com.intellij.execution.rmi.RemoteUtil.access$200(RemoteUtil.java:38)
	at com.intellij.execution.rmi.RemoteUtil$1$1$1.compute(RemoteUtil.java:156)
	at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
	at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:227)
	at com.intellij.execution.rmi.RemoteUtil$1$1.invoke(RemoteUtil.java:153)
	at com.sun.proxy.$Proxy96.set(Unknown Source)
	at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:178)
	at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:74)
	at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
	at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$3(MavenServerManager.java:404)
	at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
	... 34 more

可以从异常信息看出,该异常是idea通过rmi远程调用某个maven相关的服务出现了异常,报无法non-JRMP server at remote endpoint的异常,查询了很多网站未明确这个异常是访问具体哪个服务报的异常,但可以猜测异常的原因有:

  • 远程rpc服务端口被占用
  • 远程rpc服务假死或者有被猜测的死循环
  • 本机hosts文件配置问题,请求不到该服务

检查了hosts文件,本机文件没发现问题,基本可以确定这个rpc的服务有异常或者端口被占用。

问题处理

新开了一个项目,发现问题还是存在于是猜测这个服务应该是idea的一个全局服务。于是完全退出idea的所有服务,重启后,可以正常使用。

启示

idea出现问题,可以在 Help -> show Log in Finder中查看具体的日志信息。

你可能感兴趣的:(Java)