I tried to get some basic information from Hyper-V WMI provider. The program works well to get requested information from a Windows 2012 server, but failed from a Windows 2012 R2 server. The exception is from "JIVariant Count = wbemObjectSet_dispatch.get("Count");":
org.jinterop.dcom.impls.automation.JIAutomationException: Exception occurred. [0x80020009]
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:331)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:416)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:433)
at org.jinterop.dcom.test.HyperVPerf.performOp(HyperVPerf.java:71)
at org.jinterop.dcom.test.HyperVPerf.main(HyperVPerf.java:109)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Exception occurred. [0x80020009]
at org.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1095)
at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:969)
at ndr.NdrObject.decode(NdrObject.java:36)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:137)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:990)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:271)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:156)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:313)
... 4 more
My sample code is(almost copied from MSWMI.java in test package):
Please have a look at the detailed information from the exception. There
are methods on jiautomationexception for this (getexcepinfo, I think) ...
Best regards,
Vikram
On Apr 11, 2014 11:41 AM, "Kenny" kkpapa@users.sf.net wrote:
I tried to get some basic information from Hyper-V WMI provider. The
program works well to get requested information from a Windows 2012 server,
but failed from a Windows 2012 R2 server. The exception is:
org.jinterop.dcom.impls.automation.JIAutomationException: Exception
occurred. [0x80020009]
at
org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:331)
at
org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:416)
at
org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:433)
at org.jinterop.dcom.test.HyperVPerf.performOp(HyperVPerf.java:71)
at org.jinterop.dcom.test.HyperVPerf.main(HyperVPerf.java:109)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Exception
occurred. [0x80020009]
at org.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1095)
at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:969)
at ndr.NdrObject.decode(NdrObject.java:36)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:137)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:990)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:271)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:156)
at
org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:313)
... 4 more
My sample code is(almost copied from MSWMI.java in test package):
package org.jinterop.dcom.test;
--
The Mind is a place of its own. It can make a heaven out of hell or a hell
out of heaven. Attitude is everything. No matter how adverse conditions
maybe, one has the capacity to turn things around by one's Determination,
Perseverance and Hardwork.
I tried to get some basic information from Hyper-V WMI provider. The program works well to get requested information from a Windows 2012 server, but failed from a Windows 2012 R2 server. The exception is from "JIVariant Count = wbemObjectSet_dispatch.get("Count");":
org.jinterop.dcom.impls.automation.JIAutomationException: Exception occurred. [0x80020009]
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:331)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:416)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.get(JIDispatchImpl.java:433)
at org.jinterop.dcom.test.HyperVPerf.performOp(HyperVPerf.java:71)
at org.jinterop.dcom.test.HyperVPerf.main(HyperVPerf.java:109)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Exception occurred. [0x80020009]
at org.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1095)
at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:969)
at ndr.NdrObject.decode(NdrObject.java:36)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:137)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:990)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:271)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:156)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:313)
... 4 more
My sample code is(almost copied from MSWMI.java in test package):
"
package org.jinterop.dcom.test;
import java.net.UnknownHostException;
import java.util.logging.Level;
import org.jinterop.dcom.common.JIException;
import org.jinterop.dcom.common.JISystem;
import org.jinterop.dcom.core.IJIComObject;
import org.jinterop.dcom.core.JIArray;
import org.jinterop.dcom.core.JIComServer;
import org.jinterop.dcom.core.JIProgId;
import org.jinterop.dcom.core.JISession;
import org.jinterop.dcom.core.JIString;
import org.jinterop.dcom.core.JIVariant;
import org.jinterop.dcom.impls.JIObjectFactory;
import org.jinterop.dcom.impls.automation.IJIDispatch;
import org.jinterop.dcom.impls.automation.IJIEnumVariant;
/ WMI example showing how to use a new logger implementation.
* @since 1.23
*/
public class HyperVPerf {
}
"
Any suggestions?
Last edit: Kenny 2014-04-11
Please have a look at the detailed information from the exception. There
are methods on jiautomationexception for this (getexcepinfo, I think) ...
Best regards,
Vikram
On Apr 11, 2014 11:41 AM, "Kenny" kkpapa@users.sf.net wrote:
From e.getExcepInfo():
Exception info: org.jinterop.dcom.impls.automation.JIExcepInfo@48067064
How can I get more detail information of this exception?
Please look at the member variables/methods ...
best regards,
Vikram
On Fri, Apr 11, 2014 at 12:18 PM, Kenny kkpapa@users.sf.net wrote:
--
The Mind is a place of its own. It can make a heaven out of hell or a hell
out of heaven. Attitude is everything. No matter how adverse conditions
maybe, one has the capacity to turn things around by one's Determination,
Perseverance and Hardwork.
John Milton
(Paradise Lost)
Thanks. I got all exception information:
Exception:
source: SWbemObjectSet
Description: Invalid class [
Error Code: -2147217392
Help File: ]
The same code works for Windows 2012. Is it possible some WMI behavior changes in Windows 2012 R2?
Not sure but could be , MS does not usually change schema ... Cannot be of
much help here. You will have to check the WMI documents here.
Best regards,
Vikram
On Apr 11, 2014 12:49 PM, "Kenny" kkpapa@users.sf.net wrote: