Kbase 19507: How to troubleshoot the "MMC Snap-in Failed to initialize" message
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/29/2009 |
|
Status: Verified
GOAL:
How to troubleshoot the "MMC Snap-in Failed to initialize" message.
FIX:
The "failed to initialize" message occurs when MMC is unable to start a snap-in. The process by which this works is that MMC looks up in the registry the Progress Explorer snap-in. One of the fields defined for the snapin is the GUID (Globally Unique ID) of the COM object which implements the snapin. Given that the Progress Explorer shows up in MMC indicates that MMC found the Progress Explorer snapin. The fact that our snapin fails to initialize indicates a problem in the COM object which implements the snapin.
On Windows, the registry key is:
- For Progress 9.1A:
HKEY_LOCAL_MACHINE\SOFTWARE\Micrsoft\MMC\SnapIns\{B970C27F-CA68-11D2-AF3A-00C04FB97F7D}
- For Progress 9.1B and 9.1C:
HKEY_LOCAL_MACHINE\SOFTWARE\Micrsoft\MMC\SnapIns\{ED06106E-40A4-11d4-81B3-00C04F6B9729}
- For Progress 9.1D
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{48D545A7-E454-11D5-9E56-00C04F68C4F1}
-For Progress 9.1E:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{32B9B860-4195-417D-B45C-C7857145D711}
This key defines our snapin. The big number is the GUID of our COM object. This solution will reference XXXXXX as the GUID number. Refer to the above section for correct number.
There is also the registry key:
HKEY_CLASSES_ROOT\CLSID\XXXXX
This is the COM object for Progress Explorer. If you don't have this key defined or the GUID for the MMC snapin definition is different, MMC will fail to load Progress Explorer snapin. That is one way it can fail.
The subkey "InprocServer32" under "HKEY_CLASSES_ROOT\CLSID\XXXXXX" is the one of the fields of this key is {Default}. This defines the DLL which is to be loaded for the COM object. It should be something like:
"C:\WINNT\System32\msjava.dll". Make sure that the DLL identified really exists. If it doesn't, you will get the failed to load message.
There is a bug on our installation process for Windows 2000, where the {Default} key is not being set correctly. A variable substitution is not occurring so it was left set to something like:
"%SYSTEMROOT%\%SYSTEM32%\msjava.dll".
If you have the variables in the value you'll also get the failed to load message. You can work around this by manually changing the value of this registry key to be the full path to msjava.dll. Another key in our COM registration is:
HKEY_CLASSES_ROOT\CLSID\XXXXX\JavaClass
It should be set to "com.progress.vj.explorer.ProgressExplorer". This is the class that msjava.dll will load to start Progress Explorer. If the value of this key is different, again you'll fail. Ok, now if the registry settings are OK and the plugin still fails to load, another likely cause is that CLASSPATH is not set correctly.
When you launch Progress Explorer from the Start menu it runs the a shortcut similar to this, depending on your Progress version:
"E:\Program Files\PROGRESS\bin\jvmStartw.exe" -c @{JAVA\PROGRESSCP};@{JAVA\JRECP};@{JAVA\JFCCP} C:\WINNT\System32\mmc.exe /s "e:\Program Files\PROGRESS\proexp.msc" We launch MMC via our jvmStartW utility. In short this allows us to setup CLASSPATH before starting MMC. If we didn't do this, then MMC wouldn't find our classes. The -c option is how we pass CLASSPATH to jvmStartw. The @{JAVA\XXXCP} arguments on -c correspond to registry keys which jvmStartW will look up and use to build CLASSPATH. These are defined in:
HKEY_LOCAL_MACHINE\SOFTWARE\PSC\PROGRESS\9.1X\JAVA
where 9.1X represents your Progress version.
If these (PROGRESSCP, JRECP, & JFCCP) are not point.ing to the files actually installed, again fully resolved file names, msjava.dll will not be able to find our classes and you will get the "Failed" message from MMC.
If these are set correctly and the the Progress Explorer still fails then the problem is either in msjava.dll, jvmStartW, or in our code (specifically the method in com.progress.vj.explorer.ProgressExplorer) which MMC will call to initialize our snapin.
One possible problem with msjava.dll is that the version that is installed on the machine is not at the level we require. To resolve this possible problem consider having the user download the latest Java VM from Microsoft's Web Site. Please note that there are two separate downloads related to Java on the Microsoft download page. The one you want is for the Microsoft VM and not the one for the Microsoft Java SDK.
Yet another possibility is that the contents of the following registry key which points to the Java core classes has been deleted by some process:
HKLM\Software\Microsoft\Code Store Database\Global Namespace\Java Packages
The Progress Explorer classes need these Java core classes in order to function properly. This registry key should have some subkeys which are referencing zip files in %Windir%\Java\Packages. In order to solve this you will need to do one of the following:
1) Unzip all the zip files in %Windir%\Java\Packages into %Windir%\Java\Classes, so at the end you should have folders like Classes\com, Classes\java, Classes\sun, etc.
- OR -
2) Export the "HKLM\Software\Microsoft\Code Store Database\Global Namespace\Java Packages" registry entries from another machine and import them into your own machine. Also copy the contents of the %Windir%\Java\Packages directory from another machine to your own machine (same path)..