错误:
Exception in thread "main" org.jinterop.dcom.common.JIException: Access is denied. [0x80070005]
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:664)
at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:561)
at org.jinterop.dcom.core.JIComServer.(JIComServer.java:524)
at org.openscada.opc.lib.da.Server.connect(Server.java:108)
at cn.dst.opc.App.main(App.java:41)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Access is denied. [0x80070005]
at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:225)
at ndr.NdrObject.decode(NdrObject.java:41)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:141)
at rpc.Stub.call(Stub.java:134)
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:649)
... 4 more
测试代码:
ConnectionInformation ci = new ConnectionInformation();
ci.setHost("192.168.254.119");
ci.setDomain("");
// 这里是电脑登录账号密码
ci.setUser("OPCServer");
ci.setPassword("12345678");
ci.setClsid("21C3E5E0-B7E4-11d4-8BE0-0050BACFBB99");
Server server = new Server(ci, Executors.newSingleThreadScheduledExecutor());
server.connect();
错误: Exception in thread "main" org.jinterop.dcom.common.JIException: Access is denied. [0x80070005] at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:664) at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:561) at org.jinterop.dcom.core.JIComServer.(JIComServer.java:524)
at org.openscada.opc.lib.da.Server.connect(Server.java:108)
at cn.dst.opc.App.main(App.java:41)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Access is denied. [0x80070005]
at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:225)
at ndr.NdrObject.decode(NdrObject.java:41)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:141)
at rpc.Stub.call(Stub.java:134)
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:649)
... 4 more
测试代码: ConnectionInformation ci = new ConnectionInformation(); ci.setHost("192.168.254.119"); ci.setDomain(""); // 这里是电脑登录账号密码 ci.setUser("OPCServer"); ci.setPassword("12345678"); ci.setClsid("21C3E5E0-B7E4-11d4-8BE0-0050BACFBB99");
请问一下,原因是啥?