Dear fellow Debuggers,
The other day I ran into a problem, where my IBM Integration Designer (IID) did not start properly. I tried to start the application, but the startup never finished and was hung. Frozen - no way to stop it except killing the process. Alternatively I could have waited for it to crash..
If it does crash during the workspace initialization phase, a log file is written to the workspace/.metadata/ directory. The file is named ".log" and is always worth a look. In my case, I saw the following exception:
!ENTRY org.eclipse.osgi 2 0 2015 !MESSAGE While loading class "org.eclipse.core.runtime.RegistryFactory", thread "Thread[Start Level Event Dispatcher,5,main]" timed out waiting (5000ms) for thread "Thread[Component Resolve Thread,5,main]" to finish starting bundle "org.eclipse.equinox.registry_3.5.0.v20100503 ". To avoid deadlock, thread "Thread[Start Level Event Dispatcher,5,main]" is proceeding but "org.eclipse.core.runtime.RegistryFactory" may not be fully initialized. !STACK 0 org.osgi.framework.BundleException: State change in progress for bundle "reference:file:/C:/IBM/SDPShared/plugins/org.eclipse.equinox.registry_3.5.0.v20100503.jar" by thread "Component Resolve Thread". at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1077) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:282) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
This output points towards an issue with the equinox registry.
If it do Org.eclipse.equinox.registry is one of the first eclipse plugins started and usually indicates that a bundle was not loaded properly.
So how can we debug this further?
Create a simple file in any text editor of your choice and name it ".options" (without the quotes).
Copy/paste the following content into this file:
/debug = true org.eclipse.ui/debug = true org.eclipse.core.runtime/debug = true org.eclipse.ui/trace/graphics = true
Save your changes to the .options file
Place the .options file into the IID root directory where the eclipse.exe resides
Open a command line window and start IID using the following one-liner:
C:\IBM\IID\v8.5\eclipsec.exe -product com.ibm.wbit.feature.ide -debug -consolelog -vm C:\IBM\IID\v8.5\jdk\jre\bin\java.exe -Xquickstart -Xms512m-Xmx1024m -Xmnx64m -Xgcpolicy:gencon -Xscmx96m -Xshareclasses:name=none,nonfatal -XX:MaxPermSize=512M -Xverify:none -Declipse.p2.verifyPlan=false -cp C:\:\IBM\IID\v8.5\plugins\org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar org.eclipse.equinox.launcher.Main -debug -product com.ibm.wbit.feature.ide > IID_debug.log 2>&1
This will generate an additional IID_debug.log file in your <IID_install_root> directory. Review this log for further clues.
In my case, a simple restart of my machine and then starting IID with the -clean option resolved the error.
A pretty cool overview over the available Eclipse debug strings can be found here.
And if nothing helps, take two of these and call me in the morning.