can not import project from maven(IDEA导入maven出错)
Posted ITBusTech
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了can not import project from maven(IDEA导入maven出错)相关的知识,希望对你有一定的参考价值。
在mac下使用idea来运行maven项目,如果你遇到的问题是下面列出的:
导入项目时,始终无法进行下去,在等待一段时间后,界面总会回到上一个界面。
对一个已存在的maven项目刷新依赖时,报
cannotimportprojectfrommaven
。在build项目是,idea界面下的进度条始终在
Readingpom.xml
,进行一段时间后,提示失败。看idea日志是
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.intellij.execution.rmi.RemoteProcessSupport$2.compute(RemoteProcessSupport.java:215)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:122)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:212)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:133)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:117)
... 32 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
at java.net.Socket.(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 41 more
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 11.1.3 Build #IC-117.798
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_25
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) 64-Bit Server VM
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - Last Action: OpenProject
2012-10-03 11:58:01,752 [ 143250] ERROR - com.intellij.ide.IdeEventQueue - Original exception:
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 timed out
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:120)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:71)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
at org.jetbrains.idea.maven.server.MavenServerManager$8.execute(MavenServerManager.java:314)
at org.jetbrains.idea.maven.server.MavenServerManager$8.execute(MavenServerManager.java:311)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:311)
at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:369)
at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:98)
at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:52)
at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:405)
at org.jetbrains.idea.maven.project.MavenProjectsTree.doUpdate(MavenProjectsTree.java:534)
at org.jetbrains.idea.maven.project.MavenProjectsTree.doAdd(MavenProjectsTree.java:481)
at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:442)
at org.jetbrains.idea.maven.project.MavenProjectsTree.updateAll(MavenProjectsTree.java:413)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.readMavenProjectTree(MavenProjectBuilder.java:198)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder.access$800(MavenProjectBuilder.java:44)
at org.jetbrains.idea.maven.wizards.MavenProjectBuilder$3.run(MavenProjectBuilder.java:179)
at org.jetbrains.idea.maven.utils.MavenUtil$8.run(MavenUtil.java:388)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:288)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:641)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.intellij.execution.rmi.RemoteProcessSupport$2.compute(RemoteProcessSupport.java:215)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:122)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:212)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:133)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:117)
... 32 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
at java.net.Socket.(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 41 more
那么恭喜你,这个坑我也踩过,你需要检查你的 /etc/hosts
,看看 localhost
是不是除了 127.0.0.1
,是不是还指向其他ip了,没错这是idea的bug~
解决方法很简单,删除其他的 localhost
的映射关系,只保留 127.0.0.1
的这个就可以了~
以上是关于can not import project from maven(IDEA导入maven出错)的主要内容,如果未能解决你的问题,请参考以下文章
quasar打包时:Module not found: Can't resolve imported dependency "dayjs/plugin/customParseForm
can not implement the missing methods,either due to compile errors or the projects build path does(示
python类型错误:can only concatenate list (not "str") to list
PyTorch:The “freeze_support()” line can be omitted if the program is not going to be frozen
java.sql.SQLException: Can not issue data manipulation statements with execu 这是错误提示
首个WICKET HELLOL World 报错Can not determine Markup. Component is not yet connected to a parent.