NetBeans Could Not Install Some Modules
You are facing a classic plugin corruption issue where the Equinox framework's internal state is out of sync with the actual file system. The error message org.netbeans.InvalidException: ... state remains INSTALLED after start() tells us exactly what is happening: NetBeans believes a module is active, but the underlying OSGi bundle failed to initialize correctly during startup. This usually happens when an update process is interrupted mid-flightâlike clicking a PHP file while the installer was busyâwhich leaves orphaned lock files or corrupted metadata in the modules directory.
The immediate workaround you found, "Disable Modules and Continue," simply tells the IDE to ignore these broken plugins rather than fixing them. While this gets you into the editor, it defeats the purpose of having those tools available. Since you want to retain your custom settings and avoid a full reinstall, we need to repair the module registry without nuking your configuration.
Inspecting Module Integrity
Before touching files directly, let's verify if the corruption is in the user-specific modules or the global installation. Your error log shows two distinct paths:
C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\...(Global/All Packages)C:\Users\Arif Rana\AppData\Roaming\NetBeans\7.3beta2\modules\...(User Modules)
The presence of Mylyn and other Eclipse-based modules in the user directory suggests a mixed installation or a specific preference for user-scoped plugins. The fact that global Equinox core modules are failing indicates a deeper issue with the base framework, likely caused by the interrupted update you described.
Manual Module Repair via OSGi Console
Since GUI tools like "Disable Modules" cannot recover an InvalidException, we must intervene at the OSGi level. NetBeans embeds an OSGi runtime (Equinox), which can be accessed programmatically to inspect and reset module states.
If you have access to a working Java environment, you can launch the NetBeans OSGi console from a command prompt. This allows you to query the bundle state without starting the full IDE.
First, locate your nbinstall or ide.home path. In your case, it appears to be C:\Program Files\NetBeans 7.3 Beta 2. Construct a command that points to this directory and runs the OSGi console:
"C:\Program Files\NetBeans 7.3 Beta 2\nbinstall.exe" --nbh=console
(Note: If nbinstall.exe is not present, you may need to navigate to the bin folder inside your IDE home and run the appropriate launcher script for your OS.)
Once the console opens (it will look like a plain text window), execute the following commands to inspect the broken modules:
// List all bundles and their states
bnd list | grep -i "INSTALLED"
// If you see the Equinox bundles listed as INSTALLED but with errors, try restarting them cleanly
// Note: In the console, you might need to stop and then start specific bundles if a direct reset isn't available.
// However, for core Equinox modules, a fresh restart is often required.
If the console approach is too clunky or yields no clear resolution, the most reliable fix for this specific "state remains INSTALLED" error is to manually clear the OSGi cache. This forces NetBeans to rebuild its module registry on the next launch.
Clearing the Module Cache
The modules folder contains both the .jar files and a metadata store that tracks which modules are active. When an update fails, this metadata gets left in a "half-cooked" state.
Navigate to your NetBeans installation directory (e.g., C:\Program Files\NetBeans 7.3 Beta 2). Look for a folder named modules. Inside, you will see folders corresponding to each plugin (e.g., org-eclipse-core-runtime).
The critical step is not deleting the .jar files immediately, as that might cause missing dependency errors. Instead, focus on the hidden or metadata directories if they exist in your version, or simply rename the problematic modules' metadata to force a re-download.
However, given the specific error org.netbeans.InvalidException, the most effective manual repair is often to remove the specific module folders from the modules directory and let NetBeans re-fetch them on startup.
- Close NetBeans completely.
- Navigate to
C:\Program Files\NetBeans 7.3 Beta 2\ide\modules. - Identify the folders mentioned in your error log (e.g.,
org-eclipse-core-runtime-compatibility-auth). - Move these folders to a backup location, such as
C:\Temp\NB_Broken_Modules, instead of deleting them permanently. - Repeat this for any user-specific modules found in
%APPDATA%\NetBeans\7.3beta2\modules.
Rebooting the OSGi Framework
After removing the corrupted metadata and jar files, restart NetBeans. The IDE will detect that org.eclipse.core.runtime is missing and attempt to download it from its repository (or your local cache if available).
If you are on an offline machine or the repository is unreachable, you may need to manually place clean .jar versions of these Equinox modules into the modules folder. You can extract these from a working NetBeans 7.4 installation or download them directly from the Maven Central repository if they are public artifacts.
Final Verification
Once NetBeans starts and loads without errors, open Tools > Plugins to verify that the "Disable Modules" option is no longer necessary. If you encounter the specific error about "Developing Netbeans" plugin failing to activate after enabling modules, check the log file located in your user directory (%APPDATA%\NetBeans\7.3beta2\private\modular) for more detailed stack traces.
This approach preserves your custom settings because those are stored in the private and conf directories, not the modules directory. By cleaning only the broken plugin artifacts, you restore functionality without losing your environment. If the issue persists after clearing these folders, consider that the base Equinox framework might be fundamentally corrupted in this 7.3 Beta build, which may require a fresh install of that specific version rather than an incremental fix.