Intellj IDEA14.0.2啓動異常之3分鐘修復
今天是週一,剛到公司啓動心愛的IDEA,,忽然啓動到一半,就拋異常了,直接彈窗,報以下的異常:
Java代碼
- java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.psi.stubs.StubIndex'
- at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:158)
- at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:58)
- at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
- at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
- at java.awt.EventQueue.access$200(EventQueue.java:103)
- at java.awt.EventQueue$3.run(EventQueue.java:694)
- at java.awt.EventQueue$3.run(EventQueue.java:692)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
- at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
- at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
- at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
- at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
- at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
- at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
- at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
- at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- Caused by: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.psi.stubs.StubIndex'
- at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:239)
- at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:39)
- at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:570)
- at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:590)
- at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:225)
- at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:212)
- at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
- at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:121)
- at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:372)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:112)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
- at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:87)
- at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:509)
- at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:150)
- ... 18 more
- Caused by: java.lang.IndexOutOfBoundsException
- at java.nio.Buffer.checkIndex(Buffer.java:538)
- at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:675)
- at com.intellij.util.io.IntToIntBtree$BtreePage.syncWithStore(IntToIntBtree.java:307)
- at com.intellij.util.io.IntToIntBtree$BtreePage.setAddress(IntToIntBtree.java:299)
- at com.intellij.util.io.IntToIntBtree.persistVars(IntToIntBtree.java:133)
- at com.intellij.util.io.PersistentBTreeEnumerator.storeBTreeVars(PersistentBTreeEnumerator.java:137)
- at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:100)
- at com.intellij.util.io.PersistentEnumeratorDelegate.<init>(PersistentEnumeratorDelegate.java:38)
- at com.intellij.util.io.PersistentEnumeratorDelegate.<init>(PersistentEnumeratorDelegate.java:31)
- at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:110)
- at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:106)
- at com.intellij.util.indexing.ValueContainerMap.<init>(ValueContainerMap.java:23)
- at com.intellij.util.indexing.MapIndexStorage.a(MapIndexStorage.java:105)
- at com.intellij.util.indexing.MapIndexStorage.<init>(MapIndexStorage.java:101)
- at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:141)
- at com.intellij.psi.stubs.StubIndexImpl.<init>(StubIndexImpl.java:87)
- at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
- at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
- at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
- at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
- at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
- at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
- at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
- at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
- at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
- at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
- at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:530)
- ... 30 more
如何解決?
第一反應,打開Google搜索,輸入以下第一行異常進行搜索
Java代碼
- Fatal error initializing 'com.intellij.psi.stubs.StubIndex'
Google的搜索的效果就不用我多說了,比百度,360等等根本就不是一個層次上的,它們只配提鞋帶,直接在前3條搜索記錄中,就找到了解決辦法,這是是IDEA官方都release的bug,bug列表,你們能夠在https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+14+138.1283.4+Release+Notes可以找到,在IDEA-125750 (Bug)此條bug號裏面,記錄了解決辦法
除了在官方的bug列表可以解決問題,在Google的搜索結果中,還有一個stackoverflow問題的連接,也能解決問題,詳情請點擊此處 問題緣由是:之前裝的某些插件有問題,因而散仙就回憶了下,在上週裝了一個IDEA的Scala插件,多是因爲這個緣由形成的,只要清空windows上c:\Users\<username>\.IntelliJIdea11\config\plugins\這個目錄,而後 重啓便可 請記住咱們碼農解決問題的兩件法寶神器: (1)Google (2)Stackoverflow 神器在手,天下全有,能夠放心的早點下班回去追妹子了!
歡迎關注本站公眾號,獲取更多信息