I am trying to use orbacus in a applet using the jdk 1.3 and plugin (I
have tried without as well)
I have made sure the event and name services are running and that
everything is compiled but still get the following error :
org.omg.CORBA.COMM_FAILURE: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(Unknown
Source)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(Unknown Source)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(Unknown
Source)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(Unknown
Source)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(Unknown
Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(Unknown
Source)
at
com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferen
ces(Unknown Source)
at
com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_refe
rences(Unknown Source)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references
(Unknown Source)
at ShowDirectory.init(ShowDirectory.java:49)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
My server set up code looks like follows :
public static void main(String[] args) {
Properties props = System.getProperties();
props.put("org.omg.CORBA.ORBClass", "com.ooc.CORBA.ORB");
props.put
("org.omg.CORBA.ORBSingletonClass", "com.ooc.CORBA.ORBSingleton");
System.setProperties(props);
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);
org.omg.CORBA.BOA boa = ((com.ooc.CORBA.ORB)orb).BOA_init(args,
props);
DirectoryListServer dls = new DirectoryListServer();
orb.connect(dls);
org.omg.CORBA.Object obj = null;
org.omg.CosNaming.NamingContext nctx = null;
try {
obj = orb.resolve_initial_references("NameService");
} catch(org.omg.CORBA.ORBPackage.InvalidName e) {
System.out.println("resolve_initial_references failed !!,
name service not available");
e.printStackTrace();
}
if (obj == null) {
System.out.println("obj is null, object reference invalid");
}
nctx = org.omg.CosNaming.NamingContextHelper.narrow(obj);
if (nctx == null)
{
System.out.println("no naming context implemented");
}
and my client code looks like follows:
public void init() {
ORB orb = ORB.init(this,null);
org.omg.CORBA.Object obj = null;
try {
obj = orb.resolve_initial_references
("NameService"); // dies here
} catch(org.omg.CORBA.ORBPackage.InvalidName e) {
System.out.println("resolve_initial_references failed !!,
name service not available");
}
if (obj == null) {
System.out.println("obj is null, object reference invalid");
}
I do not understand what I have done wrong I also have orb.properties
set to the following in /jre/lib/orb.properties
org.omg.CORBA.ORBClass=com.ooc.CORBA.ORB
org.omg.CORBA.ORBSingletonClass=com.ooc.CORBA.ORBSingleton
and have the OB.jar package in the archive tag in the archive tag (the
1.3 finds and loads the jar);
I have heard there is a bug in java 2 which means the the default orb
cannot be overridden but I need a little help from someone to point
me in the correct direction on this.
thanx in advance
Krys
oh I am using orbacus 3.2.1
Sent via Deja.com http://www.deja.com/
Before you buy.