gpt4 book ai didi

Java 控制台 Corba 客户端应用程序 (Windows) 和 Ctrl+C 抛出 CORBA.COMM_FAILURE 异常

转载 作者:行者123 更新时间:2023-12-01 15:58:55 27 4
gpt4 key购买 nike

我有一个 Java 控制台应用程序 (Windows),我想在用户按 Ctrl+C 时正常关闭它。这就是为什么我使用 addShutdownHook 在我的工作线程上调用 Interrupt() 的原因。

问题是,当我处于 corba 操作中间(在我的工作线程中)并按 Ctrl+C 时,我会收到 CORBA.COMM_FAILURE 异常。你知道这是为什么吗?

这是堆栈跟踪:

org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 203  completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.writeLock(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.sendCancelRequestWithLock(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.sendCancelRequestIfFinalFragmentNotSent(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.endRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.releaseReply(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._releaseReply(Unknown Source)
at INVS._PKICMSStub.UpdateDataInput(_PKICMSStub.java:223)
at com.infonotary.invssignature.SignerThread.createDetachedCMS(SignerThread.java:289)
at com.infonotary.invssignature.SignerThread.createDetachedSignature(SignerThread.java:321)
at com.infonotary.invssignature.SignerThread.signFile(SignerThread.java:378)
at com.infonotary.invssignature.SignerThread.signDirectory(SignerThread.java:451)
at com.infonotary.invssignature.SignerThread.run(SignerThread.java:506)

编辑:在服务器端错误是:

#1  0x4054c489 in omni::giopStream::CommFailure::_raise
(minor=1096024068,
status=CORBA::COMPLETED_NO, retry=false,
filename=0x405a2259 "giopStream.cc", linenumber=878,
message=0x405a242c "Error in network receive (start of message)",
strand=0x8c879b8) at giopStream.cc:581
#2 0x4054cc8c in omni::giopStream::errorOnReceive (this=0x8c533ec,
rc=-1,
filename=0x405a2259 "giopStream.cc", lineno=878, buf=0x8cba610,

编辑:我在客户端控制台窗口上按 Ctrl+C。

编辑:可能是 CORBA 代码正在使用 sleep 操作(发送和接收时),当我中断工作线程时,它会抛出异常,这就是结果?

最佳答案

如果您正在进行 CORBA 调用并关闭客户端,我希望服务器收到 COMM_FAILURE。

关于Java 控制台 Corba 客户端应用程序 (Windows) 和 Ctrl+C 抛出 CORBA.COMM_FAILURE 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4398767/

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