[omniORB] Java Applet problem with OmniORB Naming Service

Alex Tingle alex.omniorb at firetree.net
Sun Jul 4 23:17:24 BST 2004


On Sat, 3 Jul 2004 09:20:27 -0500
Debasree Saha <debasree at geosci.uchicago.edu> wrote:

> I am having problems running Applets and connecting to the OmniORB 
> naming service. The code gives error at this line:
> 
> org.omg.CORBA.Object objRef = 
> orb.resolve_initial_references("NameService");
> 
> But I can run a simple java client and connect to the same name
> server.

Do you mean that the same client code works when built as an
application? So it only fails when it's running as an applet?

> The applet does not work even when I run the server, client
> and the name server on the same machine. Does anybody know if any
> changes has to be made in the configuration file for the applets to
> work? Any help will be greatly appreciated. Thanks

You can work out whether the problem is at the naming service or in your
applet by running the naming service with the trace level turned up.
`omniNames -ORBtraceLevel 5' should be enough for you to see when
incoming connections are established. If the naming service never sees
any incoming connections, then your applet has the problem, otherwise
the problem probably lies with the naming service.

Here are two possibilities:

1. You need to start the naming service with option:
  `-ORBsupportBootstrapAgent 1'
Sun's Java ORB uses an old protocol to find the naming service - you
need to activate support explicitly. (If your java clients work OK as
applications, then you probably already know this.)

2. You have failed to escape from the applet's sandbox. This can happen
even when everything is running on the same machine. Perhaps your
browser thinks the web-server is on localhost (127.0.0.1) while Java's
InitialHost is set to your machine's external IP address (e.g.
10.11.12.13).

good luck,

-Alex

-- 
:: alex tingle
:: 58 kings way, harrow, mddx. uk. HA1 1XU
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the omniORB-list mailing list