Issue: NetBeans cannot load my plugin

Today I faced the problem with NetBeans: it couldn’t load my plugin I’m developing.
I have a plugin representing a toolbar for IDE. If I do some changes in code and want to run a plugin invocing “Install/Reload in targed platform” command I always get an exception:

Deploying test module C:\jdev\workspace\Simpla\build\cluster\modules\com-sandlex-simpla.jar…
Disabling StandardModule:com.sandlex.simpla jarFile: C:\jdev\workspace\Simpla\build\cluster\modules\com-sandlex-simpla.jar…
INFO [org.netbeans.core.startup.NbEvents]: Turning off modules:
com.sandlex.simpla [1.0 080620]
java.lang.AssertionError
at org.netbeans.modules.versioning.VersioningManager.refreshVersioningSystems(VersioningManager.java:161)
at org.netbeans.modules.versioning.VersioningManager.resultChanged(VersioningManager.java:286)
at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:159)
at org.netbeans.core.startup.MainLookup.systemClassLoaderChanged(MainLookup.java:103)
at org.netbeans.core.startup.ModuleSystem$1.propertyChange(ModuleSystem.java:99)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at org.netbeans.ModuleManager.firePropertyChange(ModuleManager.java:259)
at org.netbeans.ChangeFirer.fire(ChangeFirer.java:109)
at org.netbeans.ModuleManager.disable(ModuleManager.java:1006)
at org.netbeans.core.startup.ModuleSystem.turnOffModule(ModuleSystem.java:404)
at org.netbeans.core.startup.ModuleSystem.deployTestModule(ModuleSystem.java:329)
at org.netbeans.core.startup.TestModuleDeployer.deployTestModule(TestModuleDeployer.java:68)
at org.netbeans.core.startup.CLITestModuleReload.cli(CLITestModuleReload.java:75)
at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:227)
at org.netbeans.CLIHandler$2.exec(CLIHandler.java:590)
at org.netbeans.CLIHandler.finishInitialization(CLIHandler.java:411)
at org.netbeans.MainImpl.finishInitialization(MainImpl.java:214)
at org.netbeans.Main.finishInitialization(Main.java:93)
at org.netbeans.core.startup.Main.start(Main.java:340)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
at java.lang.Thread.run(Thread.java:619)

and several more exceptions and new IDE instance starts without my plugin loaded and display a dialog with exception:

org.netbeans.ExitSecurityException: Illegal attempt to exit early
at org.netbeans.TopSecurityManager.checkExitImpl(TopSecurityManager.java:188)
at org.netbeans.TopSecurityManager$PrivilegedCheck.run(TopSecurityManager.java:626)
at java.security.AccessController.doPrivileged(Native Method)
at org.netbeans.TopSecurityManager$PrivilegedCheck.check(TopSecurityManager.java:651)
at org.netbeans.TopSecurityManager$PrivilegedCheck.checkExit(TopSecurityManager.java:639)
at org.netbeans.TopSecurityManager.checkExit(TopSecurityManager.java:149)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:906)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:119)
[catch] at java.lang.Thread.run(Thread.java:619)

All you need to get rid of these exceptions is clean and build you project before you start it. It works fine for me if I do it each time I want to run my plugin.

Leave a Reply