首页 > 其他分享 >idea - mac idea 无法在 project 导入或添加 module

idea - mac idea 无法在 project 导入或添加 module

时间:2022-10-28 14:37:15浏览次数:47  
标签:maven java idea module project org rmi jetbrains


idea - mac idea 无法在 project 导入或添加 module

解决方法:

本地 hosts 映射导致,注释掉一下 localhost 的映射,重试

0.0.0.0 localhost
127.0.0.1 localhost
255.255.255.255 localhost
::1 localhost

表现:

1.现象:打开 project structure -> import module ,第二个 next 挺住无法继续

2.Event log 中显示:Unable to import maven project: See logs for details

3.打开 idea log 目录查看日志(idea->help->show log for finder)显示一下信息:

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:551)
at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:397)
at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:103)
at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:62)
at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:639)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.collectProfiles(MavenProjectBuilder.java:206)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.access$900(MavenProjectBuilder.java:48)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder$1.run(MavenProjectBuilder.java:180)
at org.jetbrains.idea.maven.utils.MavenUtil$1.run(MavenUtil.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:397)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is:
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:176)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:81)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:554)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:551)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
... 23 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.intellij.execution.rmi.RemoteProcessSupport.a(RemoteProcessSupport.java:262)
at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231)
at com.intellij.execution.rmi.RemoteProcessSupport.b(RemoteProcessSupport.java:260)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:166)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:173)
... 28 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 38 more
2018-12-27 17:39:47,434 [1581094] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2017.3.4 Build #IU-173.4548.28
2018-12-27 17:39:47,434 [1581094] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2018-12-27 17:39:47,434 [1581094] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2018-12-27 17:39:47,434 [1581094] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2018-12-27 17:39:47,434 [1581094] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - 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:551)
at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:397)
at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:103)
at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:62)
at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:639)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.collectProfiles(MavenProjectBuilder.java:206)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.access$900(MavenProjectBuilder.java:48)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder$1.run(MavenProjectBuilder.java:180)
at org.jetbrains.idea.maven.utils.MavenUtil$1.run(MavenUtil.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:397)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is:
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:176)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:81)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:554)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:551)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
... 23 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.intellij.execution.rmi.RemoteProcessSupport.a(RemoteProcessSupport.java:262)
at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231)
at com.intellij.execution.rmi.RemoteProcessSupport.b(RemoteProcessSupport.java:260)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:166)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:173)
... 28 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 38 more
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2017.3.4 Build #IU-173.4548.28
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2018-12-27 17:39:47,652 [1581312] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - 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:551)
at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:397)
at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:103)
at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:62)
at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:639)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.collectProfiles(MavenProjectBuilder.java:206)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.access$900(MavenProjectBuilder.java:48)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder$1.run(MavenProjectBuilder.java:180)
at org.jetbrains.idea.maven.utils.MavenUtil$1.run(MavenUtil.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:397)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is:
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:176)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:81)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:554)
at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:551)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
... 23 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.intellij.execution.rmi.RemoteProcessSupport.a(RemoteProcessSupport.java:262)
at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231)
at com.intellij.execution.rmi.RemoteProcessSupport.b(RemoteProcessSupport.java:260)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:166)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:173)
... 28 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 38 more
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2017.3.4 Build #IU-173.4548.28
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2018-12-27 17:39:47,890 [1581550] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2018-12-27 17:39:53,526 [1587186] ERROR - llij.ide.plugins.PluginManager - Cannot reconnect.

 

标签:maven,java,idea,module,project,org,rmi,jetbrains
From: https://blog.51cto.com/u_4518216/5804848

相关文章