Operating System - Linux
1825551 Members
2638 Online
109681 Solutions
New Discussion юеВ

java initial context issue

 
Raspopova Elena
Occasional Advisor

java initial context issue

Hi,

I use CNCtxFactory to create initial context in java application:

env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(InitialContext.PROVIDER_URL, URL);

initialContext_ = new InitialContext(env);

It works fine on Windows, but it hangs when I run it on HP-UX 11.11 (JDK 1.4.2_10, all HP-UX patches recomended for JDK are installed). It hangs when the target server is accessable.

Has anybody had such issue? How to solve it?
2 REPLIES 2
Arunvijai_4
Honored Contributor

Re: java initial context issue

Hi,

Can you run your code under Java debugger and see what is going on inside ?

Just a step forward to troubleshoot.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Raspopova Elena
Occasional Advisor

Re: java initial context issue

Arunvijai, thank you for the advice.

With debugger I've found that org.omg.CORBA.portable.RemarshalException
is thrown at com.sun.corba.se.internal.corba.ClientDelegate.invoke(). This cause infinite loop in com.sun.corba.se.internal.corba.ClientDelegate.is_a() as it is reinvoked when RemarshalException is caught:
is_a(...)
{
...
try{
...
invoke(...);
...
} catch (RemarshalException e) {
return is_a(obj, dest);
}
}