一直用IDEA做Java Web方面的开发,昨天出现一系列个匪夷所思的问题如:已导入的Maven工程,在pom里添加新依赖时,IDEA的Maven插件不再自动检查pom文件的更新和下载相关依赖;右边栏的Maven Project管理模块无法添加、配置和管理pom文件;新建Maven工程时,面板一直显示“Loading archetype list”无法创建新项目等。
无法加载userArchetype.xml强大的IDEA瞬间只能用最原始的命令形式管理运行Maven工程让人头疼不已,折腾两天试过无数还原和清理软件缓存等方式依然无果,后来想到查看IDEA目录结构看看是否存在配置问题,然后意外在Log里发现一堆如下的异常信息:
"AWT-EventQueue-1 14.0.3#IU-139.1117.1, eap:false" prio=0 tid=0x0 nid=0x0 blocked
java.lang.Thread.State: BLOCKED
on org.jetbrains.idea.maven.indices.MavenIndicesManager@42133de8 owned by "ApplicationImpl pooled thread 4" Id=40
at org.jetbrains.idea.maven.indices.MavenIndicesManager.doShutdown(MavenIndicesManager.java:130)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.dispose(MavenIndicesManager.java:123)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:47)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:125)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:102)
at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:146)
at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:102)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:115)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:102)
at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:146)
at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:102)
at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:132)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:108)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl$7.run(ApplicationImpl.java:323)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:977)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:320)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:809)
at com.intellij.openapi.application.impl.ApplicationImpl.access$800(ApplicationImpl.java:87)
at com.intellij.openapi.application.impl.ApplicationImpl$11.run(ApplicationImpl.java:785)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:791)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:740)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:735)
at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame$4$1.run(FlatWelcomeFrame.java:157)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
"RMI TCP Accept-0" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:439)
at java.net.ServerSocket.implAccept(ServerSocket.java:468)
at java.net.ServerSocket.accept(ServerSocket.java:436)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
at java.lang.Thread.run(Thread.java:695)
"process reaper" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.lang.UNIXProcess.waitForProcessExit(Native Method)
at java.lang.UNIXProcess.access$900(UNIXProcess.java:17)
at java.lang.UNIXProcess$2$1.run(UNIXProcess.java:86)
"Smack Packet Reader" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:422)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:460)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:820)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read1(BufferedReader.java:187)
at java.io.BufferedReader.read(BufferedReader.java:261)
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2971)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3025)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:363)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:45)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:67)
"ApplicationImpl pooled thread 11" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
at java.net.Socket.connect(Socket.java:527)
at java.net.Socket.connect(Socket.java:476)
at java.net.Socket.<init>(Socket.java:373)
at java.net.Socket.<init>(Socket.java:187)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
看起来好像出了一些网络原因的问题,顺着这个方向搜索,发现国外也有类似的[讨论][id],按照建议把hosts文件里localhost的地址更新回只指向127.0.0.1后(之前由于测试改成别的了),一切完好如初,太坑了折腾这么久,吃一堑长一智,不过算是学会了从软件日志中找这种“偶发性”系统问题的方法。
[id]:https://youtrack.jetbrains.com/issue/IDEA-64132#comment=27-380070
网友评论