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

Getting org.omg.CORBA.BAD_PARAM exception

419 views
Skip to first unread message

Lukas Zapletal

unread,
Jul 19, 2007, 5:14:49 AM7/19/07
to
Hello,

I am trying to connect to CORBA service with simple client and I am
getting

org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
at
com.pikeelectronic.calc.CORBAClient.CalculatorHelper.narrow(CalculatorHelper.java:
60)
at com.pikeelectronic.calc.CORBAClient.Client.main(Client.java:
23)

I am using JacORB on both client and server side. I use
corbaloc::localhost:40000/MyService. I googled that I need to run
Naming Service but it did not help (I have tried the naming service
from the JacORB distribution).

Thanks for help

Lukas

Yakov Gerlovin

unread,
Jul 23, 2007, 6:39:38 AM7/23/07
to
Hello,

Narrow is a safe downcast, meaning that you receive the object
only if it's of the required type (or type, derived from it). In your
case it looks like you provide the object that is not of type
com.pikeelectronic.calc.CORBAClient.Calculator
that is probably the reason for the exception.

Naming service is used to retrieve (resolve) object references by
logical name. This is very similar to DNS that resolves hostname (like
www.google.com) to some IP address.
Typically the sequence for using naming service is like this
1. The server connects to the Naming servive and publishes (using
'bind' method) the object reference under some path
2. The client creates NamingContext proxy (that represents the Naming
Service).
3. Using this proxy the client connects to this Naming Service and
resolves the object reference by specifying same path
4. The clients narrows the object reference to expected type.

To summarize, please make sure
corbaloc::localhost:40000/MyService
resolves to the
com.pikeelectronic.calc.CORBAClient.Calculator
object. If not, please consult with server's documentation on how to
retrieve the object reference. Some servers saves the stringified form
of object reference in file.


0 new messages