Can't start Idea 14.1.1

2019-06-26 03:51发布

问题:

I have installed Intellij Idea 14.1.1 After setting up by wizard screen on first run then error caught:

    Internal error. Please report to https://youtrack.jetbrains.com

java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl'
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:178)
    at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
    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 'org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl'
    at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:248)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.initStandardFileTypes(FileTypeManagerImpl.java:273)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.<init>(FileTypeManagerImpl.java:230)
    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 com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
    at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
    at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:125)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:359)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:116)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
    at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:101)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:504)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:486)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:170)
    ... 16 more
Caused by: java.util.ServiceConfigurationError: javax.imageio.spi.ImageWriterSpi: Provider com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriterSpi could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:224)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
    at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210)
    at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
    at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
    at javax.imageio.ImageIO.<clinit>(ImageIO.java:65)
    at org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl.createFileTypes(ImageFileTypeManagerImpl.java:80)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.initStandardFileTypes(FileTypeManagerImpl.java:270)
    ... 38 more
Caused by: java.lang.IllegalArgumentException: vendorName == null!
    at javax.imageio.spi.IIOServiceProvider.<init>(IIOServiceProvider.java:76)
    at javax.imageio.spi.ImageReaderWriterSpi.<init>(ImageReaderWriterSpi.java:231)
    at javax.imageio.spi.ImageWriterSpi.<init>(ImageWriterSpi.java:213)
    at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriterSpi.<init>(CLibJPEGImageWriterSpi.java:84)
    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 java.lang.Class.newInstance(Class.java:379)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
    ... 45 more

note:

  • source : https://www.jetbrains.com/idea/download/
  • there's similar problems found on google, but mine is different from them
  • i'm using jdk 7
  • ubuntu 14.04 LTS

回答1:

Simply deleting:

~/Library/Java/Extensions

(which contains the offending JAI jar) does the job on a Mac.

Relevant issues: https://youtrack.jetbrains.com/issue/IDEA-137147

http://youtrack.jetbrains.com/issue/IDEA-139178



回答2:

A similar problem on OSX seems to have a root cause of the commonly used JAI extension jar files being somewhat mis-configured with a null vendorName. If you need the JAI extensions for some reason (because, for example, your local GeoServer upgrade re-installs them in ~/Library/Java/Extensions) then a work-around is to create a ~/Library/Preferences/IdeaIC14/idea.vmoptions file that contains ONLY:

-Djava.ext.dirs=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext

That seems to override OSX Java 6's default behavior of checking the user's ~/Library/Java/Extensions directory in addition to the system's extensions on application start up.

If you are using some other JRE version/operating system then adjusting those paths or making sure that the Java extension directory that the application that needs JAI is different from the one that IntelliJ uses may help. At worst you might install two JDK/JRE's and give each application a different JAVA_HOME value.