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

Has anyone successfully run a JavaORB applet using java 1.2.2??

1 view
Skip to first unread message

Andy H

unread,
Mar 6, 2000, 3:00:00 AM3/6/00
to
I can't even get the sample that comes with JavaORB to work in the
applet viewer. I finally figured out how to instruct the built-in Sun
ORB to use the JavaORB instead and now I am getting the following stack
trace:

java.lang.ExceptionInInitializerError: org.omg.CORBA.INITIALIZE: can't
instantiate default ORB implementation JavaORB.CORBA.ORBSingleton minor
code: 0 completed: No
at org.omg.CORBA.ORB.create_impl(ORB.java:305)
at org.omg.CORBA.ORB.<clinit>(ORB.java:202)
at Client.init(Client.java:127)
at sun.applet.AppletPanel.run(AppletPanel.java:333)
at java.lang.Thread.run(Thread.java:479)

Clearly, it is trying to instantiate an instance of
JavaORB.CORBA.ORBSingleton but it is failing for some reason. I can't
figure out why because the create_impl() method in org.omg.CORBA.ORB has
a generic exception handler that simply prints out "can't instantiate
default ORB implementation <class_name>" whenever anything goes wrong
(great idea, Sun).

I have already pulled all my hair on my head out on this one, can anyone
help?

Thanks,
Andy

Robert O'Brien

unread,
Mar 7, 2000, 3:00:00 AM3/7/00
to
I'm a beginner at this but I got similar errors. The problem was solved by
creating a file, orb.properties, in my jdk1.2.2./jre/lib directory. It
looked like:
<SNIP>
org.omg.CORBA.ORBClass=com.{THE VENDOR INFO}.ORBImpl
org.omg.CORBA.ORBSingletonClass=com.{THE_VENDOR INFO}.ORBSingleton
</SNIP>
using another ORB which is in development.
HTH
-rob-

Andy H

unread,
Mar 8, 2000, 3:00:00 AM3/8/00
to
That works fine for a java application, but I'm talking about an applet,
where you are not allowed to access/create files on the client machine.
I think there is a problem in the JavaORB classes that is causing the
problem I'm seeing. It appears the ORBSingleton class is trying during
initializtion to open a file (ORB.ref) which is of course a security
exception. I've asked the JavaORB people about this, but I haven't
received any reply yet.

Andy

hfrost_no_spam

unread,
Apr 2, 2000, 4:00:00 AM4/2/00
to
Andy,
A snipit of your code wold be most helpful - especially ORB.init(...).
- Howard
In article <38C69ADA...@wcom.com>,


Sent via Deja.com http://www.deja.com/
Before you buy.

Andy H

unread,
Apr 3, 2000, 3:00:00 AM4/3/00
to
Here is the init() method of the applet. I put **** where the exception
is thrown:

public void init()
{
java.util.Properties props = new java.util.Properties();
props.put("org.omg.CORBA.ORBClass", "JavaORB.CORBA.ORBSingleton");
props.put("org.omg.CORBA.ORBSingletonClass",
"JavaORB.CORBA.ORBSingleton");

**** org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init((java.applet.Applet)
this,props);

org.omg.CORBA.Object obj = null;
org.omg.CosNaming.NamingContext naming = null;
try
{
obj = orb.resolve_initial_references("NameService");
naming = org.omg.CosNaming.NamingContextHelper.narrow(obj);
}
catch ( org.omg.CORBA.ORBPackage.InvalidName name )
{
System.out.println("Unable to resolve NameService");
System.exit(0);
}

org.omg.CosNaming.NameComponent [] name = new
org.omg.CosNaming.NameComponent[1];
name[0] = new org.omg.CosNaming.NameComponent();
name[0].id = "Calculator";
name[0].kind = "Example";

try
{
obj = naming.resolve(name);
}
catch ( org.omg.CosNaming.NamingContextPackage.NotFound ex )
{
System.out.println("Object not found");
System.exit(0);
}
catch ( org.omg.CosNaming.NamingContextPackage.CannotProceed ex
{
System.out.println("Cannot proceed");
System.exit(0);
}
catch ( org.omg.CosNaming.NamingContextPackage.InvalidName ex )
{
System.out.println("Invalid name");
System.exit(0);
}

calc = CalculatorHelper.narrow(obj);

draw();

0 new messages