Ruben Laguna's blog

Feb 21, 2008 - 1 minute read - Comments - illegalstateexception modulemanager netbeans rcp troubleshooting

Netbeans Paint Application

My first try with the Netbeans Paint Application tutorial didn’t work as expected. For some reason I got this stack trace when I tried to run it:

java.lang.IllegalStateException: Module was supposed to be OK: StandardModule:org.netbeans.modules.projectuiapi jarFile: C:\Program Files\NetBeans 6.0\ide8\modules\org-netbeans-modules-projectuiapi.jar
       at org.netbeans.ModuleManager.maybeAddToEnableList(ModuleManager.java:1087)
       at org.netbeans.ModuleManager.maybeAddToEnableList(ModuleManager.java:1104)
       at org.netbeans.ModuleManager.maybeAddToEnableList(ModuleManager.java:1104)
       at org.netbeans.ModuleManager.simulateEnable(ModuleManager.java:1048)
       at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:379)
       at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:341)
       at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:275)
       at org.netbeans.core.startup.Main.getModuleSystem(Main.java:171)
       at org.netbeans.core.startup.Main.start(Main.java:322)
[catch] at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
       at java.lang.Thread.run(Thread.java:619)

I managed to solve it although I don’t really know the cause.

  1. Download netbeans-6.0.1-200801291616-ml-platform.zip
  2. Unpack it in c:\netbeans (so there's a c:\netbeans\platform7)
  3. Go to Tools -> Netbeans Platforms
  4. Click on Add platform
  5. Select c:\netbeans
  6. Finish
  7. Right click on PaintApp project and select Properties
  8. On the Libraries tab. Change the Netbeans Plaform to Netbeans Platform Dev (Build 200801291616)
  9. Select all modules but Core UI and Platform
  10. Rebuild and run