Error running inspect.sh from command line
I am trying to run the IDEA inspections from the command line.
I get exceptions trying to run it using 10.0.3 and the latest 10.5 EAP (idea-IU-107.18/). However, the behavior is slightly different for the two versions.
My command line is very simple.
~/bin/idea-10/bin/idea.sh inspect CodeNarc.ipr ~/.IntelliJIdea10/config/inspection/Default.xml
The .ipr is valid, and the inspection profile is valid.
Am I doing something wrong here?
On 10.5 I get a stacktrace about a HeadlessException around PangoFonts.
On 10.0.3 I get the same exception, but then the program gets trapped in a loop trying to instantiate an instance of com.intellij.diagnostic.IdeErrorsDialog, which does not exist, which triggers the same exception over again... it just loops.
Here is the stacktrace:
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
... 6 more
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
[ 90] ERROR - llij.ide.plugins.PluginManager - Error while accessing com.intellij.idea.MainImpl.start with arguments: [inspect, CodeNarc.ipr, /home/hdarcy/.IntelliJIdea10/config/inspection/Default.xml]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
... 6 more
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
[ 92] ERROR - llij.ide.plugins.PluginManager - JDK: 1.6.0_24
[ 92] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 92] ERROR - llij.ide.plugins.PluginManager - Vendor: Sun Microsystems Inc.
[ 92] ERROR - llij.ide.plugins.PluginManager - OS: Linux
[ 92] ERROR - llij.ide.plugins.PluginManager - Original exception:
java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
... 6 more
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
[ 90] ERROR - llij.ide.plugins.PluginManager - Error while accessing com.intellij.idea.MainImpl.start with arguments: [inspect, CodeNarc.ipr, /home/hdarcy/.IntelliJIdea10/config/inspection/Default.xml]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
... 6 more
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
[ 92] ERROR - llij.ide.plugins.PluginManager - JDK: 1.6.0_24
[ 92] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 92] ERROR - llij.ide.plugins.PluginManager - Vendor: Sun Microsystems Inc.
[ 92] ERROR - llij.ide.plugins.PluginManager - OS: Linux
[ 92] ERROR - llij.ide.plugins.PluginManager - Original exception:
java.lang.ExceptionInInitializerError
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1543)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1507)
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1394)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:513)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
at com.intellij.ide.a.e.x.a(x.java:73)
at com.intellij.idea.MainImpl._main(MainImpl.java:138)
at com.intellij.idea.MainImpl.start(MainImpl.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:169)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
at com.sun.java.swing.plaf.gtk.PangoFonts.<clinit>(PangoFonts.java:43)
... 14 more
Please sign in to leave a comment.
Hello Hamlet,
the fix should be available in a next 10.5 EAP.