gpt4 book ai didi

java - jInterop - 访问被拒绝 [0x00000005]

转载 作者:行者123 更新时间:2023-11-30 10:26:38 25 4
gpt4 key购买 nike

我们有一个包含 java 组件和 com 组件的应用程序,它们之间的通信是通过 j-Interop 促进的。

我们已经使用它近 3 年了,没有出现重大问题,但直到最近我们才发现我们的 Java 组件在尝试与 com 对象通信时出现错误 - 访问被拒绝 [0x00000005]。

com 对象正在工作,我们已经对其进行了测试,并且在此异常之后多次验证了 DCOM 配置。

已根据以下链接验证 DCOM 设置 - http://www.softwaretoolbox.com/dcom/html/configuring__local_security_settings1.html

我们使用的版本是 j-interop-3.0。

我们也和微软的支持人员讨论过这个问题,根据联合调试推断调用没有到达 ole 层,因此我们需要调查 j-Interop 抛出的错误。

我们面临这个问题的服务器环境是Windows Server R2 2008 standard和Windows Server 2016 Standard。

为了解决这个问题,有什么不同的方法可以解决吗?

下面是我们得到的错误的完整堆栈跟踪:

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

我们将不胜感激。

谢谢。

最佳答案

希望以下解决方案对您有用。它对我有用。

将以下补丁应用于注册表:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System创建或修改 32 位 DWORD:LocalAccountTokenFilterPolicy将值设置为:1

可以引用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

关于java - jInterop - 访问被拒绝 [0x00000005],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45605656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com