Thursday, December 27, 2012

Netbeans 7.2 and upward crash on start after installing python module.

I have installed python plugin to my Netbeans 7.2.1 and after restart the IDE it struck  in module loading step in start-up screen and then crashed.
To find the reasons i read the Netbeans Log located in


[HardDrive]:\Users\[UserName]\AppData\Roaming\NetBeans\7.2.1\var\log


And after reading the log i found out that there is a class not found exception occurred as stated below.


java.lang.NoClassDefFoundError: org.osgi.framework.hooks.bundle.CollisionHook starting from ModuleCL@2bb7f958[org.netbeans.modules.netbinox] with possible defining loaders [ModuleCL@2ae827e1[org.netbeans.libs.osgi]] and declared parents [org.netbeans.MainImpl$BootClassLoader@b98df1f, ModuleCL@5bd7a97b[org.netbeans.core.netigso], ModuleCL@2ae827e1[org.netbeans.libs.osgi]]&oq=java.lang.NoClassDefFoundError: org.osgi.framework.hooks.bundle.CollisionHook starting from ModuleCL@2bb7f958[org.netbeans.modules.netbinox] with possible defining loaders [ModuleCL@2ae827e1[org.netbeans.libs.osgi]] and declared parents [org.netbeans.MainImpl$BootClassLoader@b98df1f, ModuleCL@5bd7a97b[org.netbeans.core.netigso], ModuleCL@2ae827e1[org.netbeans.libs.osgi]]


This error cause the Netbeans IDE to crash it when it load the modules. Reason for this is because Netbeans modules use OSGI framework to wire up the modules in the start up and with the version 7.2 onwards the necessary OSGI distribution was not bundled with the Netbeans.

To fix this all we have to do is download the necessary jar files from OSGI site and copy them to Netbeans location.


  1. Download the latest OSGI core from here.
  2. Rename the jar file to :

    org.osgi.core-[version no].jar
  3. Copy it to the lib folder of Netbeans resides in following location,

    [HardDrive]:\Program Files\NetBeans 7.2.1\platform\lib



13 comments:

  1. Sahan, you helped me to fix this problem. Thank you.

    ReplyDelete
  2. thank you, this work for me too...

    ReplyDelete
  3. Thank you for this fix :-)

    ReplyDelete
  4. This worked for me too. Thank You very much. Keep up the good work

    ReplyDelete
  5. Thank you! What I thought was going to take me a day or more to find and resolve this issue...took me all of 10 mins from the time I started my search for solution to the time my IDE is back up and running.

    Thanks again.

    ReplyDelete
  6. Hello,

    I am still facing the issue after adding 'org.osgi.core-4.3.0.jar' at location: C:\Program Files\NetBeans 7.2\platform\lib

    Log shows:
    *******************************
    INFO [org.netbeans.modules.netbinox]: Install area set to file:/C:/Program Files/NetBeans 7.2/
    java.lang.NoClassDefFoundError: org.osgi.framework.hooks.bundle.CollisionHook starting from ModuleCL@13cd4d9[org.netbeans.modules.netbinox] with possible defining loaders [ModuleCL@128ecab[org.netbeans.libs.osgi]] and declared parents [org.netbeans.MainImpl$BootClassLoader@e75147, ModuleCL@d7ab81[org.netbeans.core.netigso], ModuleCL@128ecab[org.netbeans.libs.osgi]]
    at org.eclipse.osgi.framework.internal.core.Framework.(Framework.java:105)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
    at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
    at org.netbeans.modules.netbinox.Netbinox.init(Netbinox.java:84)
    at org.netbeans.core.netigso.Netigso.prepare(Netigso.java:166)
    at org.netbeans.NetigsoHandle.turnOn(NetigsoHandle.java:127)
    at org.netbeans.ModuleManager.enable(ModuleManager.java:1176)
    at org.netbeans.ModuleManager.enable(ModuleManager.java:1011)
    at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340)
    at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
    at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:301)
    at org.netbeans.core.startup.Main.getModuleSystem(Main.java:181)
    at org.netbeans.core.startup.Main.getModuleSystem(Main.java:150)
    at org.netbeans.core.startup.Main.start(Main.java:307)
    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
    at java.lang.Thread.run(Thread.java:722)

    *********************************

    Please help

    Regards
    Somesh

    ReplyDelete
  7. Somesh: I ran into the same problem, but I found a 5.0.0 version of it and that seems to work. I don't know if this is the right thing to do, but at least the thing starts up now.

    ReplyDelete
  8. thankz Sahan,I could fix it from this article :)

    ReplyDelete