我希望能帮助解决这个奇怪的问题.我们正在运行Jacorb名称服务器,我有一个简单的客户端,我正在尝试连接并做了很棒的CORBA伏都教.名称服务器正在运行,但是当我尝试启动我的Java应用程序时,我得到了一个"Connection failure" error (org.omg.CORBA.COMM_FAILURE, minor code 201, "caused by java.net.ConnectionException: Connection refused: connect").
这是奇怪的部分.该错误报告它正在尝试使用默认端口900进行连接,但我传入一个参数以尝试覆盖名称服务的端口号以匹配名称服务器使用的端口号.我的java命令是这样的:
java -classpath . HelloClient -Djava.endorsed.dirs="bla bla bla" <br>
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
-DORBInitRef.NameService=corbaloc::localhost:2809/StandardNS/NameServer-POA/_root
Run Code Online (Sandbox Code Playgroud)
我也尝试了没有第一个大写字母D的参数(我已经看到了两种方式,我不知道其中的区别).
现在,如果我输入-ORBInitialPort 2809,那么客户端似乎尝试连接,但后来我收到corba.OBJECT_NOT_EXIST错误.
我可以使用任何人的帮助或建议.
当我的应用程序使用远程接口进行 EJB 查找时,出现以下异常。它工作正常,最近构建的东西发生了变化,破坏了它。
java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:279)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
我试图在virtualenv for python中安装omniorb.
使用omniorb包含的配置脚本执行此操作似乎相当困难.
有没有人知道omniorb的pip,setup.py或easy_install脚本?
我有一个简单的'Hello world' C++/Java应用程序CORBA.服务器是写入的C++,客户端在Java.我使用omniORBs omniNames作为名称服务.
我想omniNames在我的localhost
(Ubuntu)上运行我的服务器,并在我的localhost Ubuntu上安装的VirtualBox中的Windows XP SP3上运行我的客户端.
(我的意思是:在我的localhost上我安装了Ubuntu操作系统,在Ubuntu中我安装了VirtuaBox和Windows XP SP3'.')
我试过这个:
omniNames -start ./server -ORBInitRef
NameService=corbaloc::localhost:2809/NameServicejava client -ORBInitRef NameService=corbaloc::x.x.x.x:2809/NameService但是有错误:
C:\Temp\java>java client -ORBInitRef NameService=corbaloc:212.106.19.209:2809/Na
meService
pa? 10, 2012 3:51:17 PM com.sun.corba.se.impl.naming.namingutil.CorbalocURL badA
ddress
WARNING: "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(Unk
nown Source)
at …Run Code Online (Sandbox Code Playgroud) 我正在使用omniORB和C++.
在我的应用程序中,我得到了几个不同模块的小CORBA序列,然后我需要将它们组合成一个大序列以进行进一步处理.有这么简单的方法吗?像seq2.append(seq1)或的东西seq2.push_back(seq1).还是一些运营商?(我真的是STL-things的新手).
我发现的唯一方法是手动遍历小序列的每个元素并将其添加到大序列中.
//idl
struct Device;
typedef sequence<Device> DevicesList;
//c++
icore::DevicesList full_list;
foreach (const DStatusList &stlist, states_) {
icore::DevicesList list = convertList(stlist);
int newlength = full_list.length() + list.length();
int last_index = full_list.length();
full_list.length(newlength);
int j=0;
for(int i=last_index; i< last_index+list.length(); i++,j++) {
full_list[i] = list[j];
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢.
当我使用 ORB.object_to_string 方法时,如何确保 JacORB 使用固定端口(例如 6001)?
我在 JacORB 配置中尝试了一些操作,但每个生成的 IOR 都是随机端口。
我们有一个现有的应用程序,它设置了 CORBA ORB 运行时环境作为客户端。
目前,我们没有指定要使用的任何本地接口(IP/以太网),并且运行时似乎在我们的本地计算机上获得了一些默认接口。使用的机器是Oracle,操作系统是Solaris。
这里使用的ORB运行环境是Java 7 JDK内置的ORB。
有没有什么方法可以明确指示应通过某些属性使用某个本地 IP 接口ORB.init(...)?
这可能太本地化了,但我希望有人可以帮我正确地表达我的问题.
因此,我们有一个前端Web服务器,使用CORBA与后端应用服务器通信.我被要求将后端应用程序移植到LINUX盒子,我做了.但是,为了测试它,我试图将前端Web服务器指向LINUX后端.
我们正在使用omniORB-4.1.4,以下是如何获得后端系统的实例:
String args[] = new String[0];
System.out.println(getDateTime()+"Instance: Connecting to: "+initialHost+" "+initialPort+" "+enviornment+" "+version);
java.util.Properties props = new java.util.Properties();
props.put("org.omg.CORBA.ORBInitialPort", initialPort);
props.put("org.omg.CORBA.ORBInitialHost", initialHost);
props.put("com.sun.CORBA.giop.ORBGIOPVersion", "1.0");
orb=org.omg.CORBA.ORB.init(args,props);
Run Code Online (Sandbox Code Playgroud)
如果前端和后端都在SUN/Solaris机箱上运行,那么它似乎可以正常运行.但是,当后端在LINUX盒上运行时,它会发出Connection Refused异常,主机名为127.0.0.1
2012/10/22 13:53:22.033 EvaluateInstance: Connecting to: cmrheldv 23026 DEV87 0871
Oct 22, 2012 1:53:22 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: cmrheldv; port: 23026"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:205)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:218)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:101)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:171)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)
at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:74) …Run Code Online (Sandbox Code Playgroud) 我刚刚阅读了CORBAand JMS,它们似乎都用于实现
Broker Architecture/Pattern。
我对他们有几个问题
1.他们之间的区别我还不清楚,请解释一下?
2.今天的IT解决方案是否使用了CORBA?还是正在失去魅力?
3.JMS 是否可以替代 CORBA 的方方面面?
corba ×10
java ×6
c++ ×2
solaris ×2
connection ×1
ejb ×1
jms ×1
linux ×1
omniorb ×1
pip ×1
python ×1
sequence ×1
virtualbox ×1
virtualenv ×1