public class PointDefaultFactory implements
org.omg.CORBA.portable.ValueFactory {
public java.io.Serializable read_value
(org.omg.CORBA.portable.InputStream is) {
java.io.Serializable val = new PointImpl();
// create and initialize value
val = ((org.omg.CORBA_2_3.portable.InputStream)is).read_value(val);
return val;
}
}
And the code with the change that I had to make to compile is,
pasted below.
public class PointDefaultFactory implements
org.omg.CORBA.portable.ValueFactory {
public java.io.Serializable
read_value(org.omg.CORBA_2_3.portable.InputStream is)
{
java.io.Serializable val = new PointImpl();
val = ((org.omg.CORBA_2_3.portable.InputStream)is).read_value(val);
return val;
}
}
After I made these changes, the code gets compiled, but the Client
still does throws a runtime error, which is pasted below.
phoenix{avi31: vbj Server &
[1] 15669
phoenix{avi32:
phoenix{avi32: PointManagerImpl@47b00c is ready.
phoenix{avi32: vbj Client
Command-->?
USAGE INFORMATION
createbase <label>
createderived <label>
connect <label>
destroy <label>
get <label>
list <num copies of each>
quit
Command-->createbase Tarzan
Exception in thread "main" java.lang.NoSuchMethodError
at com.inprise.vbroker.orb.CDRInputStream.doReadValue(CDRInputStream.java:3493)
at com.inprise.vbroker.orb.CDRInputStream.read_value(CDRInputStream.java:3403)
at Map.PointHelper.read(PointHelper.java:31)
at Map._PointManagerStub.create_point(_PointManagerStub.java:100)
at Client.main(Client.java:68)
phoenix{avi33:
Here is the IDL of the example.
//IDL for the Point Example
module Map{
valuetype Point {
public long x;
public long y;
public string label;
void print();
}; interface PointManager {
string get_name();
Point create_point(in long x, in long y, in Label lab,
in boolean connectable)
raises(DuplicatePoint, InvalidPoint);
Point get_point(in Label lab)
raises(UnknownPoint, InvalidPoint);
void destroy_point(in Label lab)
raises(UnknownPoint, InvalidPoint);
void connect_point(in Label lab,
in LabelSeq connectTo)
raises(UnknownPoint, InvalidPoint);
// returns 'scaling_factor' number of copies of
// every created point.
PointSeq list_points(in unsigned long scaling_factor);
};
};// end of Map
//End of IDL for Point Example
The line where it throws the error, line # 68 in the Client program
happens to be,
//Code for Client program
public class Client {
//
..........
..........
public static void main(String[] args) {
// Initialize the ORB and other stuff...
........
........
Point point = pointManager.create_point(x++, y++, lab,
false);<<<---ERROR here
if (point != null) {
point.print();
}
else {
System.out.println("Point is [nil]");
}
.........
.........
}//end of main
} // end
I have written quite a bit of code already and all the other files
run fine.
Just before posting this message I ran some other examples that come
with Visibroker, and they run fine too.Here are the Visibroker related
environment variables that I have set. please let me know if I am
missing something in the environment settings.
path /opt/local/visibroker/bin
MANPATH /opt/local/visibroker/bin:
VBROKER_ADM /opt/local/visibroker/adm
OSAGENT_PORT 15555
I hope given enough details. Can someone please tell me what the
problem is. I expected that the example that came with Visibroker to
run, when that did not happen, I do not know where else to look for.
Thanks in advance.
Shankar.
Maybe try to use JDK1.2 with VisiBroker 4.0
Good luck!
lqqchen
"Shankar" <luvzo...@yahoo.com> wrote in message
news:816a4295.03060...@posting.google.com...