jInterop - Access is denied [0x00000005]

2

We have an application with a java component and a com component, the communication between which is facilitated through j-Interop.

We have been using this for almost 3 years with no major issues, but only recently we have observed that our java components fails while it tries to commumnicate with the com object with the error - Access is denied [0x00000005].

The com object is working we have testing the same, also the DCOM configurations have been verified multiple times following this exception.

The DCOM settings were verified with respect to the following link - http://www.softwaretoolbox.com/dcom/html/configuring__local_security_settings1.html

The version we are using is j-interop-3.0.

We have also taken this up with Microsoft support, and as per the joint debugging it was inferred that the calls are not reaching the ole layer, hence we need to look into the error thrown by j-Interop.

The server environment where we are facing this problem is Windows Server R2 2008 standard and Windows Server 2016 Standard.

Is there anything that can be done differently in order to resolve this issue?

Below is the complete stack trace of the error that we are getting :

Aug 09, 2017 4:30:15 PM org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerT
ask run
INFO: Running ClientPingTimerTask !
Aug 09, 2017 4:30:15 PM org.jinterop.dcom.core.JIComOxidRuntime$ServerPingTimerT
ask run
INFO: Running ServerPingTimerTask !
Aug 09, 2017 4:30:15 PM org.jinterop.dcom.core.JISession createSession
INFO: Created Session: 1042741037
Aug 09, 2017 4:30:16 PM org.jinterop.dcom.common.JISystem internal_dumpMap
INFO: mapOfHostnamesVsIPs: {}
Aug 09, 2017 4:30:16 PM rpc.DefaultConnection processOutgoing
INFO:
Sending BIND
Aug 09, 2017 4:30:16 PM rpc.DefaultConnection processIncoming
INFO:
Recieved BIND_ACK
Aug 09, 2017 4:30:16 PM rpc.DefaultConnection processOutgoing
INFO:
Sending AUTH3
Aug 09, 2017 4:30:16 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Aug 09, 2017 4:30:16 PM rpc.DefaultConnection processIncoming
INFO:
Recieved FAULT
org.jinterop.dcom.common.JIException: Access is denied, please check whether the
[domain-username-password] are correct. Also, if not already done please check
the GETTING STARTED and FAQ sections in readme.htm. They provide information on
how to correctly configure the Windows machine for DCOM access, so as to avoid s
uch exceptions. [0x00000005]
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:661)
at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:496)
at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:460)
at TestConnectivity.initialize(TestConnectivity.java:128)
at TestConnectivity.HDAconnect(TestConnectivity.java:165)
at TestConnectivity.main(TestConnectivity.java:82)
Caused by: rpc.FaultException: Received fault. (unknown)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:1
41)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:626)
... 5 more
Exited
Aug 09, 2017 4:30:16 PM org.jinterop.dcom.core.JISession postDestroy
INFO: About to destroy links for Session: 1042741037 , size of which is 0

Any help will be appreciated.

Thank you.

java
com-interop
asked on Stack Overflow Aug 10, 2017 by Merlyn Francis • edited Jul 6, 2020 by Martijn Pieters

1 Answer

1

Hope the following solution works for you. It worked for me.

apply the following patch to the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System create or modify 32-bit DWORD: LocalAccountTokenFilterPolicy set the value to: 1

You can refer https://answers.microsoft.com/en-us/windows/forum/windows_7-security/getting-access-is-denied-when-accessing-windows-7/23369f35-bc45-4147-9c3e-74a47d530757

-- SK

answered on Stack Overflow Apr 16, 2018 by Sai Krish

User contributions licensed under CC BY-SA 3.0