|
Problem(Abstract) |
If improperly coded, the string for multiple CORBA object
URLs within a JNDI InitialContext request within applications, receive a
ClassCastException error.
java.lang.ClassCastException: com.ibm.rmi.corba.ProtAddrImpl
at
com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory...)
at
com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory...)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:360) |
|
|
|
Cause |
When setting up JNDI requests in an application, perform
the InitialContext request providing multiple CORBA object URLs; however,
if coded incorrectly and there are one or more spaces between the entries,
you can receive a ClassCastException:
Incorrect syntax with two spaces between entries:
env.put(Context.PROVIDER_URL,"corbaloc::myhost1:9810, :myhost1:9811,
:myhost2:9810");
|
|
|
Resolving the
problem |
Ensure that multiple CORBA object provider URLs do not
have spaces between entries. The following example is extracted from the
Information Center:
Correct syntax:
env.put(Context.PROVIDER_URL,"corbaloc::myhost1:9810,:myhost1:9811,:myhost2:9810");
|
|
|
|