JVM 1.2 上的 CORBA 服务器和 1.3 上的客户端
我有一个在 JVM 1.2 上编译并运行的 corba 服务器。我使用 java IDL 来编译 IDL 文件并生成所需的存根和框架,并使用 NameService 来启动服务器。如果在同一系统上运行客户端,我可以连接到服务器,但如果我尝试在 JVM 1.3 上的不同计算机上运行客户端,我将无法连接到服务器。
但是我可以在两台不同的机器上运行它,它们都在 JVM 1.2 上,这些是我正在使用的命令
在服务器上
<代码> tnameserv -ORBInitialPort 2000
java HelloServer -ORBInitialPort 2000 -ORBInitialHost myhost
在客户端计算机上java HelloClient -ORBInitialPort 2000 -ORBInitialHost myhost
但我在客户端收到以下错误。我参考了此网站上的示例 http://download.oracle .com/javase/1.3/docs/guide/idl/GShome.html
错误堆栈跟踪
<代码> 错误:org.omg.CORBA.COMM_FAILURE:次要代码:1398079490 已完成:否 org.omg.CORBA.COMM_FAILURE:次要代码:1398079490 已完成:否 在 com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnection.java:956) 在 com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:1017) 在 com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:71) 在 com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:82) 在 com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:153) 在com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:195) 在com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:260) 在com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:183) 在com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1465) 在 HelloClient.main(HelloClient.java:17)
I have a corba server compiled and running on JVM 1.2. I am using the java IDL to compile the IDL file and generate the required stubs and skeletons and using a NameService to start the server. I am able to connect to the server if running the client on the same system, but if i try running the client on a different machine on JVM 1.3 I am not able to connect to the server.
However I am able to run thhis on two different machines both on JVM 1.2, these are the commands i am using
On the server
tnameserv -ORBInitialPort 2000
java HelloServer -ORBInitialPort 2000 -ORBInitialHost myhost
On the client machine
java HelloClient -ORBInitialPort 2000 -ORBInitialHost myhost
But I am getting the following error at the client side. I referred to the example on this site http://download.oracle.com/javase/1.3/docs/guide/idl/GShome.html
Error stacktrace
ERROR : org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnection.java:956)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:1017)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:71)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:82)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:153)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:195)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:260)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:183)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:1465)
at HelloClient.main(HelloClient.java:17)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑到 Java 1.5 已结束生命两年,1.3 已近五年,而 1.2 我不知道还有多远,我强烈建议您同时运行这两个版本客户端和服务器在当前的版本上,即 1.6 或 1.7(如果您是早期采用者),但显然您不是;-)
Considering that Java 1.5 is two years into end-of-life, 1.3 is nearly five years, and 1.2 I don't know how far, I strongly suggest you run both client and server on something current, i.e. 1.6 or 1.7 if you're an early adopter, which clearly you aren't ;-)