C++ server + java client do not work

This is a discussion on C++ server + java client do not work within the Object forums in Theory and Concepts category; Hello I wrote simple C++ client and server (under MICO/FreeBSD) and it works fine (throu IOR files). I try to write java client for that server, here's code: import java.io.*; import org.omg.CORBA.*; import Calc.*; /*my classes*/ public class client { public static void main(String args[]) { try{ ORB orb = ORB.init(args, null); BufferedReader in = new BufferedReader(new FileReader(args[0])); String ior = in.readLine(); in.close(); org.omg.CORBA.Object obj = orb.string_to_object(ior); Calc c = CalcHelper.narrow(obj); System.out.println("Sum: "+c.Sum(3,4)); } catch (Exception e) { e.printStackTrace(System.out); } } } after compilation i try to launch client: #java client /path/to/ior.file org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No at org.omg.CORBA.portable.Delegate.releaseReply(Deleg ...

Go Back   Application Development Forum > Theory and Concepts > Object

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-03-2004, 10:38 AM
vertigo
Guest
 
Default C++ server + java client do not work

Hello
I wrote simple C++ client and server (under MICO/FreeBSD) and it works
fine (throu IOR files). I try to write java client for that server,
here's code:

import java.io.*;
import org.omg.CORBA.*;
import Calc.*; /*my classes*/

public class client {
public static void main(String args[]) {
try{
ORB orb = ORB.init(args, null);
BufferedReader in = new BufferedReader(new FileReader(args[0]));
String ior = in.readLine();
in.close();

org.omg.CORBA.Object obj = orb.string_to_object(ior);
Calc c = CalcHelper.narrow(obj);

System.out.println("Sum: "+c.Sum(3,4));
} catch (Exception e) {
e.printStackTrace(System.out);
}
}
}
after compilation i try to launch client:
#java client /path/to/ior.file
org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No
at org.omg.CORBA.portable.Delegate.releaseReply(Deleg ate.java:328)
at org.omg.CORBA.portable.ObjectImpl._releaseReply(Ob jectImpl.java:260)
at _CalcStub.Sum(_CalcStub.java:29)
at client.main(client.java:24)

I tried many modifications, but still gets similar errors.
What's wrong ?
Does anybody know any good example on web where client/server are not in
the same language ? I have doubts if CORBA is really language/platform
independednt...

Thanx for any help
Michal



Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:42 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.