0xC0000022 Error when configuring j-interop

2011-11-29
2012-11-29
  • Friends,

    I'm trying to configure my win2k8r2 x64 machine to be working with j-interop.
    The details of my environment:
    1. Windows 2008 R2 in domain
    2. user on behalf of which I'm trying to connect: Administrator (local Administrator)
    3. the permissions are set - all which are mentioned on http://j-interop.org/quickstart.html
    4. the registry tweak is also done for HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6} key
    5. Remote registry and Server services are up and running

    Trying to connect to my server -

            String domain = "localhost";
            String username = "Administrator";
            String password = "P@ssw0rd";
            String remoteMachineName = "oa-ykon-vm3";
    
            ClientInfo clientInfo = new ClientInfo(domain, username, password, remoteMachineName);
            com.dcom.utils.Log.setJInteropOff();
            sWbemLocator = new SWbemLocator(clientInfo);
            sWbemLocator.clientConnect();
    

    my problem is -

    Exception in thread "main" com.dcom.exception.DCOMException: org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000022
        at com.dcom.client.ServiceConnection.connect(ServiceConnection.java:102)
        at com.dcom.client.ConnectionMgr.clientConnect(ConnectionMgr.java:58)
        at Example.main(Example.java:41)
    Caused by: org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000022
        at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:134)
        at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:509)
        at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:414)
        at com.dcom.client.ServiceConnection.connect(ServiceConnection.java:87)
        ... 2 more
    Caused by: jcifs.smb.SmbAuthException: Access is denied.
        at jcifs.smb.SmbTransport.send(SmbTransport.java:689)
        at jcifs.smb.SmbSession.send(SmbSession.java:234)
        at jcifs.smb.SmbTree.send(SmbTree.java:103)
        at jcifs.smb.SmbFile.send(SmbFile.java:725)
        at jcifs.smb.SmbFileOutputStream.write(SmbFileOutputStream.java:223)
        at rpc.ncacn_np.RpcTransport.send(RpcTransport.java:114)
        at rpc.DefaultConnection.transmitFragment(DefaultConnection.java:144)
        at rpc.DefaultConnection.transmit(DefaultConnection.java:72)
        at rpc.ConnectionOrientedEndpoint.send(ConnectionOrientedEndpoint.java:222)
        at rpc.ConnectionOrientedEndpoint.connect(ConnectionOrientedEndpoint.java:248)
        at rpc.ConnectionOrientedEndpoint.bind(ConnectionOrientedEndpoint.java:216)
        at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:84)
        at rpc.Stub.call(Stub.java:113)
        at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:132)
        ... 5 more
    

    Tried to google for the answer but unfortunately unsuccessfully.
    Could you please help or give a hint what i'm doing wrong?