If I use wmic linux client , I can execute wmi query successfully
If I use my jinterop client, I get this error
I get this error when use JInerop to open WMI connection:
org.jinterop.dcom.common.JIException: Message not found for errorCode:
0x80070005
at org.jinterop.dcom.core.JIRemUnknownServer.call(JIRemUnknownServer.java:159)
at org.jinterop.dcom.core.JIRemUnknownServer.addRef_ReleaseRef(JIRemUnknownServer.java:179)
at org.jinterop.dcom.core.JISession.addRef_ReleaseRef(JISession.java:781)
at org.jinterop.dcom.core.JIComObjectImpl.addRef(JIComObjectImpl.java:120)
at org.jinterop.dcom.core.JIComServer.createInstance(JIComServer.java:875)
at ServiceManager.createCOMServer(ServiceManager.java:153)
at ServiceManager.execute(ServiceManager.java:89)
at ServiceManager.stopService(ServiceManager.java:74)
at ServiceManager.main(ServiceManager.java:50)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not
found for errorCode: 0x80070005
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.JIRemUnknownServer.call(JIRemUnknownServer.java:150)
... 8 more
JISession.createSession("",userName,password);
dcomSession.useSessionSecurity(false);
JIComServer comServer = new
JIComServer(JIClsid.valueOf("8BC3F05E-D86B-11d0-A075-00C04FB68820"),hostIP,dcomSession);
IJIDispatch wbemLocator = (IJIDispatch)
narrowObject(comServer.createInstance().queryInterface(IID));
//parameters to connect to WbemScripting.SWbemLocator
Object[] params = new Object[] {
new JIString(hostIP),//strServer
new
JIString(win32_namespace),//strNamespace
JIVariant.OPTIONAL_PARAM(),//strUser
JIVariant.OPTIONAL_PARAM(),//strPassword
JIVariant.OPTIONAL_PARAM(),//strLocale
JIVariant.OPTIONAL_PARAM(),//strAuthority
new Integer(0),//iSecurityFlags
If I use wmic linux client , I can execute wmi query successfully
2.
If I use my jinterop client, I get this error
I get this error when use JInerop to open WMI connection:
org.jinterop.dcom.common.JIException: Message not found for errorCode:
0x80070005
at
org.jinterop.dcom.core.JIRemUnknownServer.call(JIRemUnknownServer.java:159)
at
org.jinterop.dcom.core.JIRemUnknownServer.addRef_ReleaseRef(JIRemUnknownServer.java:179)
at org.jinterop.dcom.core.JISession.addRef_ReleaseRef(JISession.java:781)
at org.jinterop.dcom.core.JIComObjectImpl.addRef(JIComObjectImpl.java:120)
at org.jinterop.dcom.core.JIComServer.createInstance(JIComServer.java:875)
at ServiceManager.createCOMServer(ServiceManager.java:153)
at ServiceManager.execute(ServiceManager.java:89)
at ServiceManager.stopService(ServiceManager.java:74)
at ServiceManager.main(ServiceManager.java:50)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not
found for errorCode: 0x80070005
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.JIRemUnknownServer.call(JIRemUnknownServer.java:150)
... 8 more
narrowObject(comServer.createInstance().queryInterface(IID));
//parameters to connect to WbemScripting.SWbemLocator
Object[] params = new Object[] {
new JIString(hostIP),//strServer
new
JIString(win32_namespace),//strNamespace
JIVariant.OPTIONAL_PARAM(),//strUser
JIVariant.OPTIONAL_PARAM(),//strPassword
JIVariant.OPTIONAL_PARAM(),//strLocale
JIVariant.OPTIONAL_PARAM(),//strAuthority
new Integer(0),//iSecurityFlags
--
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.
Hi !
my test environment : linux ,java 1.6 ; wmi server is windows 2012 R2
I have two client : jinterop java client and wmic linux client (
http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2 )
If I use wmic linux client , I can execute wmi query successfully
If I use my jinterop client, I get this error
I get this error when use JInerop to open WMI connection:
org.jinterop.dcom.common.JIException: Message not found for errorCode:
0x80070005
at org.jinterop.dcom.core.JIRemUnknownServer.call(JIRemUnknownServer.java:159)
at org.jinterop.dcom.core.JIRemUnknownServer.addRef_ReleaseRef(JIRemUnknownServer.java:179)
at org.jinterop.dcom.core.JISession.addRef_ReleaseRef(JISession.java:781)
at org.jinterop.dcom.core.JIComObjectImpl.addRef(JIComObjectImpl.java:120)
at org.jinterop.dcom.core.JIComServer.createInstance(JIComServer.java:875)
at ServiceManager.createCOMServer(ServiceManager.java:153)
at ServiceManager.execute(ServiceManager.java:89)
at ServiceManager.stopService(ServiceManager.java:74)
at ServiceManager.main(ServiceManager.java:50)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not
found for errorCode: 0x80070005
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.JIRemUnknownServer.call(JIRemUnknownServer.java:150)
... 8 more
This is my java code :
JISession.createSession("",userName,password);
dcomSession.useSessionSecurity(false);
JIComServer comServer = new
JIComServer(JIClsid.valueOf("8BC3F05E-D86B-11d0-A075-00C04FB68820"),hostIP,dcomSession);
narrowObject(comServer.createInstance().queryInterface(IID));
//parameters to connect to WbemScripting.SWbemLocator
Object[] params = new Object[] {
new JIString(hostIP),//strServer
new
JIString(win32_namespace),//strNamespace
JIVariant.OPTIONAL_PARAM(),//strUser
JIVariant.OPTIONAL_PARAM(),//strPassword
JIVariant.OPTIONAL_PARAM(),//strLocale
JIVariant.OPTIONAL_PARAM(),//strAuthority
new Integer(0),//iSecurityFlags
JIVariant.OPTIONAL_PARAM()//objwbemNamedValueSet
};
JIVariant results[] =
wbemLocator.callMethodA("ConnectServer", params);
IJIDispatch wbemServices = (IJIDispatch)
narrowObject(results[0].getObjectAsComObject());
Thanks in advance.
--
Regards
Falls Huang
Hi,
Is this user which you are connecting with the same as that used by openVAS
?
best regards,
Vikram
On Fri, Oct 10, 2014 at 2:35 PM, fallshuang fallshuang@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)