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

Contacting nameserver without osagent

4 views
Skip to first unread message

Norbert Frisch

unread,
Oct 29, 1999, 3:00:00 AM10/29/99
to
Hello !

Sun's JavaIDL example works fine in the JDK environment.
Now I want to run the Applet in Netscape using the built-in
Visigenic corba classes. Unfortunately, Visigenic locates everything
with the proprietary smart agent (osagent).
Moreover, I want not to use Visigenic's nameserver, but, say, Sun's
tnameserv.
I get the following error message in Netscape's Java console:

HelloApplet exception: org.omg.CORBA.ORBPackage.InvalidName
org.omg.CORBA.ORBPackage.InvalidName
at org.omg.CORBA.UserException.<init>(Compiled Code)
at org.omg.CORBA.ORBPackage.InvalidName.<init>(Compiled Code)
at com.visigenic.vbroker.CORBA.dynamic.OrbHelperImpl.resolve_initial_references(Compiled Code)
* at com.visigenic.vbroker.CORBA.ORB.resolve_initial_references(Compiled Code)
at HelloApplet.init(Compiled Code)
...

The corresponding code line is:
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");

Thank's a lot for your advice.

Norbert

--

---------------------------------------------------------------------------
Norbert Frisch Room 2.115
Visualization and Interactive Systems (VIS) Computer Science Institute
Email: fri...@informatik.uni-stuttgart.de Stuttgart University
Phone: 0049 (0)711 7816 454 Breitwiesenstraße 20-22
Fax: 0049 (0)711 7816 340 70565 Stuttgart, Germany
---------------------------------------------------------------------------

Rainer 'rain' Frohnhoefer

unread,
Nov 2, 1999, 3:00:00 AM11/2/99
to
Norbert Frisch wrote:

> Hello !
>
> Sun's JavaIDL example works fine in the JDK environment.
> Now I want to run the Applet in Netscape using the built-in
> Visigenic corba classes. Unfortunately, Visigenic locates everything
> with the proprietary smart agent (osagent).
> Moreover, I want not to use Visigenic's nameserver, but, say, Sun's
> tnameserv.
> I get the following error message in Netscape's Java console:
>
> HelloApplet exception: org.omg.CORBA.ORBPackage.InvalidName
> org.omg.CORBA.ORBPackage.InvalidName
> at org.omg.CORBA.UserException.<init>(Compiled Code)
> at org.omg.CORBA.ORBPackage.InvalidName.<init>(Compiled Code)
> at com.visigenic.vbroker.CORBA.dynamic.OrbHelperImpl.resolve_initial_references(Compiled Code)
> * at com.visigenic.vbroker.CORBA.ORB.resolve_initial_references(Compiled Code)
> at HelloApplet.init(Compiled Code)
> ...
>
> The corresponding code line is:
> org.omg.CORBA.Object objRef =
> orb.resolve_initial_references("NameService");
>

You're in JDK 2, right?

To disable the osagent lookup, use

---
.....
java.util.Properties props = new java.util.Properties();
props.put("ORBdisableLocator", "true");
.....
orb_ = org.omg.CORBA.ORB.init(this, props);
.....
---


I'm not so sure that the code generated with Sun's idltojava will work with netscape's builtin
Visibroker (2.5 or so). Maybe you need a Visibroker dev package and use its idl2java program with
appropriate options.

Are the the .java files generated with idl*java interchangeable between different orbs?

... more questions ... &)

-Rain.

--
"To save energy
we will temporarily switch off
the light at the end of the tunnel."
(I don't employ for my speaker)

Norbert Frisch

unread,
Nov 3, 1999, 3:00:00 AM11/3/99
to
> You're in JDK 2, right?

Netscape has built in JRE 1.1.5,
but for development I used JDK 1.2.

> java.util.Properties props = new java.util.Properties();
> props.put("ORBdisableLocator", "true");
> .....
> orb_ = org.omg.CORBA.ORB.init(this, props);

Thanks a lot, I think this will work.

> I'm not so sure that the code generated with Sun's idltojava will work with netscape's builtin
> Visibroker (2.5 or so). Maybe you need a Visibroker dev package and use its idl2java program with
> appropriate options.
>
> Are the the .java files generated with idl*java interchangeable between different orbs?

Good question.
As I can tell, a basic client compiled with JDK idl compiler worked in Netscape
with Visibroker. Seems to me, that Visigenic ORB is wrapped by org.omg.CORBA.ORB,
so that the interface might be independent.
However, I have some trouble at present to run a
CORBA server under netscape, which runs well with appletviewer.
This problem seems not beeing directly connected to CORBA.

Here's the detailed java console trace:


# Loading class HelloApp._HelloImplBase
# Fetching http://wwwvis.informatik.uni-stuttgart.de/~frisch/javatest/HelloApp/_HelloImplBase.class
# Loading class org.omg.CORBA.DynamicImplementation
# Fetching http://wwwvis.informatik.uni-stuttgart.de/~frisch/javatest/org/omg/CORBA/DynamicImplementation.class
# Applet exception: HelloApp/_HelloImplBase
java.lang.NoClassDefFoundError: HelloApp/_HelloImplBase
at java.lang.ClassLoader.defineClass(ClassLoader.java:250)
at netscape.applet.AppletClassLoader.loadClass(AppletClassLoader.java:617)
at netscape.applet.AppletClassLoader.findClass(AppletClassLoader.java:802)
at netscape.applet.AppletClassLoader.loadClass1(AppletClassLoader.java:685)
* at netscape.applet.AppletClassLoader.loadClass(AppletClassLoader.java:649)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
at HelloServerApplet$CorbaThread.run(HelloServerApplet.java:33)
# Applet HelloServerApplet HelloApp/_HelloImplBase
java.io.IOException: vcafe: not found
at java.lang.Runtime.exec(Runtime.java:170)
* at java.lang.Runtime.exec(Runtime.java:134)
at netscape.debug.Debugger.launchDebugger(Debugger.java:93)
at netscape.debug.Debugger.uncaughtException(Debugger.java:37)
at netscape.applet.AppletThreadGroup.uncaughtException(AppletThreadGroup.java:49)


So, the appropiate file is loaded, but the contained class is not loaded.
javap reprted that the class is in the file.

Here is part of the related code:

public class HelloServant extends_HelloImplBase {...}
...
helloRef = new HelloServerApplet.HelloServant();


I think I had a similar problem long time ago, not connected to
corba. But I don't know the solution anymore.

Do you have some advice ?

Sincerely,
Norbert

Mike Moran

unread,
Nov 3, 1999, 3:00:00 AM11/3/99
to Norbert Frisch
Norbert Frisch wrote:
[ ... ]

> Here is part of the related code:
>
> public class HelloServant extends_HelloImplBase {...}
> ...
> helloRef = new HelloServerApplet.HelloServant();
[ ... ]

This may be a stupid suggestion, but: shouldn't there be a space between
"extends" and "_HelloImplBase" ?

--
Mike Moran, Dept. of Electrical Engineering, The University of Edinburgh
King's Buildings, Mayfield Rd, Edinburgh EH9 3JL

Rainer 'rain' Frohnhoefer

unread,
Nov 5, 1999, 3:00:00 AM11/5/99
to
Norbert Frisch wrote:

> [snip]

> Here's the detailed java console trace:
>
> # Loading class HelloApp._HelloImplBase
> # Fetching

> # Loading class org.omg.CORBA.DynamicImplementation
> # Fetching ...

> # Applet exception: HelloApp/_HelloImplBase

> java.lang.NoClassDefFoundError: HelloApp/_HelloImplBase
> at java.lang.ClassLoader.defineClass(ClassLoader.java:250)

> [snip]

> So, the appropiate file is loaded, but the contained class is not loaded.
> javap reprted that the class is in the file.
>

> Here is part of the related code:
>
> public class HelloServant extends_HelloImplBase {...}
> ...
> helloRef = new HelloServerApplet.HelloServant();
>

> I think I had a similar problem long time ago, not connected to
> corba. But I don't know the solution anymore.

Looks like a compiler/classpath problem to me. Are you sure you compiled the IDL-generated files into the right
directory? (or, the right source files into the right directory) The '_xxxImplBase.java' are generated by idltojava
and should be there. I don't know if the sun idltojava supports a '-package' switch, maybe it has put things where
you'd never expected them.

Hope this helps,

0 new messages