Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

org.omg.CosNaming.NamingContextPackage.NotFound (no network cable: in WinNT/2000 error, in Win98: OK!)

1 view
Skip to first unread message

Bas van Gils

unread,
Aug 24, 2001, 4:01:50 AM8/24/01
to
I have a piece of code which seems to work ok, but:

- running on Windows NT/2000 with no network cable attached, I get the
following error:
org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)

- running on Windows NT/2000 with the network cable attached, it works
fine...
- running on Windows 98 with no network cable attached, it works
fine...
- running on Windows 98 with the network cable attached, it works
fine...

This is the source (not written by me...)
----------------------------------------------------------
if (itsFwInitial == null) {
if (Debug.ISACTIVE) Debug.trace(this,
"FWProxy.getFwInitial",
"");
org.omg.CORBA.Object objRef =
itsOrb.resolve_initial_references("NameService");
NamingContext ncRef =
NamingContextHelper.narrow(objRef);

NameComponent nc =
new NameComponent(itsManager.getMyInitialName(), "");
NameComponent path[] = {nc};

boolean gotFwInitial = false;

while (!gotFwInitial || itsFwInitial == null) {
try {

for (;;)
try {
System.out.println("resolve "+path);
itsFwInitial =
IpFwInitialHelper.narrow(ncRef.resolve(path));
gotFwInitial = true;
break;
} catch (Exception e1) {
e1.printStackTrace();
try {
Thread.currentThread().sleep(1000);
} catch (Exception e2) {
}
}
} catch (Exception requestException) {
try {
synchronized(this) {
wait(3000);
}
} catch (InterruptedException interruptedException) {

}
}
}
}
return itsFwInitial;
----------------------------------------------------------

Can you help me with this?

Bill Lloyd

unread,
Aug 24, 2001, 12:16:24 PM8/24/01
to
Hi Bas,

ORBs use DNS to resolve hostnames into IP addresses. I suspect that Win98
is better at skipping this and/or resolving things (because Win2000 machines
are almost always networked, while Win98 machines are less frequently so).

At any rate, here are some things which can all assist in fixing this:

1) You can use dotted decimal IP addresses instead of hostnames. I don't
know what ORB you're using so I can't tell you how to do that.
2) You can edit your \winnt\system32\drivers\etc\hosts file and put your
machine's hostname and IP address in there. This will short-circuit the DNS
lookup and fix the issue.

That's most of 'em, I think... #2 will fix it for sure, if you know what
entries to put in there (to find your IP address, just do 'ping mymachine'
where mymachine is the hostname of your computer. It'll give you the IP
address you're working with. Then in hosts put a line like this:

xx.yy.zz.aa myhost myhost.mydomain.com

where the number is the IP address of your machine. Make sure windows
doesn't rename the file 'hosts.txt' (it will do this sometimes :-P) and
you're good to go.

Cheers,

-B

"Bas van Gils" <dj_c...@yahoo.com> wrote in message
news:b91a2def.01082...@posting.google.com...

Bas van Gils

unread,
Aug 29, 2001, 9:36:25 AM8/29/01
to
Great!! My problem had been solved by your 2nd solution (haven't tried
the first one....)

Thanx!

"Bill Lloyd" <b_l...@nixme.eudoramail.com> wrote in message news:<9m5uq8$60t$1...@spider.iona.com>...

0 new messages