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
Andy
Sent via Deja.com http://www.deja.com/
Before you buy.
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();