0

after a restart of my computer i am trying to start up PHPStorm. i havent installed nor deleted anything on my computer but suddenly im getting the following error:

    Failed to clear URL cache
Failed to clear URL cache
[   3877]  ERROR - llij.ide.plugins.PluginManager - com.intellij.openapi.wm.impl.TestWindowManager cannot be cast to com.intellij.openapi.wm.impl.WindowManagerImpl 
java.lang.ClassCastException: com.intellij.openapi.wm.impl.TestWindowManager cannot be cast to com.intellij.openapi.wm.impl.WindowManagerImpl
    at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:277)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:206)
    at com.intellij.idea.MainImpl$2.run(MainImpl.java:141)
    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 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)
[   3882]  ERROR - llij.ide.plugins.PluginManager - JetBrains PhpStorm 6.0.3  Build #PS-129.814 
[   3882]  ERROR - llij.ide.plugins.PluginManager - JDK: 1.7.0_51 
[   3882]  ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM 
[   3883]  ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation 
[   3883]  ERROR - llij.ide.plugins.PluginManager - OS: Linux 
[   3883]  ERROR - llij.ide.plugins.PluginManager - Last Action:  

Ive read around on different sites and some say that the fix to this is :

sudo apt-get install openjdk-7-jdk

However when i attempt to run the above command i get the following:

    Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openjdk-7-jdk

Has anyone ever seen this error before and know a way to fix it?

Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
  • **1)** I'm not sure if PhpStorm **v6** can be run under 1.7 JDK (latest PhpStorm is v8). Maybe 1.6 is required? **2)** Backup and delete (or maybe just rename) the config folders used by IDE and start from scratch (so not configs/caches is there from old version). Possibly one of the recently updated plugins is screwing up things: https://intellij-support.jetbrains.com/entries/23358108-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs – LazyOne Oct 01 '14 at 12:12

1 Answers1

4

Exception shows that you are trying to run PHPStorm in headless mode. Please make sure that you don't pass -Djava.awt.headless=true to it. Also make sure to run it from the X Server session (Gnome, KDE, etc)

BTW, I'd strongly recommend using Oracle JDK instead of Open JDK that is known for performance and visual issues (and doesn't always come with needed graphical libraries. See Installing IDEA on Ubuntu 11.10 for some tips

Community
  • 1
  • 1
lena
  • 90,154
  • 11
  • 145
  • 150
  • Where can i check that i do not pass Djava.awt.headless=true – Marc Rasmussen Oct 01 '14 at 12:55
  • in phpstorm.vmoptions file. See https://intellij-support.jetbrains.com/entries/23395793-Configuring-JVM-options-and-platform-properties. And in the .sh file – lena Oct 01 '14 at 13:18
  • i removed the line from the options file but phpstorm still will not start – Marc Rasmussen Oct 01 '14 at 13:19
  • Thanks I had the same error starting Pycharm -- turns out I had installed a headless jdk. Not sure how long it would have taken me to figure this out myself. – John Powell Oct 13 '14 at 10:45