Could not enumerate processes (1) error?

With JRockit, you may sometimes see the following warning when starting the JVM (on Windows):

[WARN ][osal ] Could not enumerate processes (1) error=-1073738819
[WARN ][osal ] Could not add counter (null)\ for query
[WARN ][osal ] Failed to init virtual size counter

It may also look something like this:

[JRockit] WARNING: Could not initialize the virtualbytes counter, some functionality in jrockit.management.Memory will not be available. Message was: failed to create counter query. String was: (null)\Virtual Bytes

Or like this:

[JRockit] WARNING: Could not initialize the JVM process load counter, CPU load generated by the JVM will not be available. Message was: failed to create counter query. String was: (null)\% Processor Time

This means the JRockit cannot access the relevant PDH counters. Sometimes the counter is disabled, and then it can simply be re-enabled.  Worst case, the counters can be corrupt, and the metadata needs to be rebuilt from system backup store.

To check the status of the counters, open a command prompt as admin, and run lodctr /q, as follows:

C:\Windows\system32>lodctr /q
Performance Counter ID Queries [PERFLIB]:
Base Index: 0x00000737 (1847)
Last Counter Text ID: 0x00001572 (5490)
Last Help Text ID: 0x00001573 (5491)
[.NET CLR Data] Performance Counters (Enabled)
DLL Name: netfxperf.dll
Open Procedure: OpenPerformanceData
Collect Procedure: CollectPerformanceData
Close Procedure: ClosePerformanceData
First Counter ID: 0x00001092 (4242)
Last Counter ID: 0x0000109E (4254)
First Help ID: 0x00001093 (4243)
Last Help ID: 0x0000109F (4255)
[.NET CLR Networking] Performance Counters (Enabled)
DLL Name: netfxperf.dll
Open Procedure: OpenPerformanceData
Collect Procedure: CollectPerformanceData
Close Procedure: ClosePerformanceData
First Counter ID: 0x00001086 (4230)
Last Counter ID: 0x00001090 (4240)
First Help ID: 0x00001087 (4231)
Last Help ID: 0x00001091 (4241)
[.NET Data Provider for Oracle] Performance Counters (Enabled)
DLL Name: netfxperf.dll
Open Procedure: OpenPerformanceData
Collect Procedure: CollectPerformanceData
Close Procedure: ClosePerformanceData
First Counter ID: 0x00001068 (4200)
Last Counter ID: 0x00001084 (4228)
First Help ID: 0x00001069 (4201)
Last Help ID: 0x00001085 (4229)

If it says (Disabled) next to a provider, the provider can be enabled with:

C:\Windows\system32>lodctr /e:<provider name> (where <provider name> is the string between the brackets at the beginning of the entry).

If the performance counters still behave badly, rebuild them from system backup store by running:

C:\Windows\system32>lodctr /r

Some counters may still be disabled after this. Use lodctr /q and lodctrl /e as described above to enable the ones you need.

If lodctrl is not available on your version of Windows, this article may help.