[prev in list] [next in list] [prev in thread] [next in thread]
List: jacorb-developer
Subject: [jacorb-developer] Question about naming service
From: Luca Foschini <luca.foschini () studio ! unibo ! it>
Date: 2007-02-05 18:48:32
Message-ID: 45C77C00.6000704 () studio ! unibo ! it
[Download RAW message or body]
Dear all,
I'm trying to realize a simple naming context hierarchy by using the
JacORB ns.
To do this, first I obtain a reference to the RootContext:
org.omg.CORBA.Object tmp_ref =
orb.resolve_initial_references("NameService");
org.omg.CosNaming.NamingContextExt default_context =
org.omg.CosNaming.NamingContextExtHelper.narrow(tmp_ref);
Then, I create a new NameComponent for the new context, and I try to
invoke bind_new_context on the default_context (created above):
NameComponent [] name = new NameComponent[1];
name[0] = new NameComponent("myContext", "context");
Object tmp_obj = default_context.bind_new_context(name);
my_context = org.omg.CosNaming.NamingContextExtHelper.narrow(
tmp_obj );
All works fine until the invocation of bind_new_context method.
Then, it seems that the new context gets added (as shown by NameManager
GUI), but I get the following exception, and I'm not able to
obtain my_context:
org.omg.CORBA.BAD_INV_ORDER: Server-side Exception: The Servant has not
been associated with an ORBinstance
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.jacorb.orb.SystemExceptionHelper.read(SystemExceptionHelper.java:173)
at org.jacorb.orb.ReplyReceiver.getReply(ReplyReceiver.java:326)
at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:967)
at org.jacorb.orb.Delegate.invoke(Delegate.java:868)
at org.jacorb.orb.Delegate.is_a(Delegate.java:1268)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:49)
at
org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:57)
at
org.omg.CosNaming.NamingContextHelper.read(NamingContextHelper.java:29)
at
org.omg.CosNaming._NamingContextExtStub.bind_new_context(_NamingContextExtStub.java:144)
at server.main(server.java:69)
Has anyone else got the same problem?
Any suggestions?
Thanks for your kind attention!
Best Regards,
Luca
--
___________________________________________________
Luca Foschini
Address:
via Nino Bixio, 1
48018 Faenza (RA)
ITALY
email: luca.foschini@studio.unibo.it
____________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic