This forum has been archived. Please start a new discussion on GitHub.

client glacier2 issues

hello,my platform is vs 2008 mfc + ice3.3.1 .
the problem comes when i use glacier2.

here is my init code: = Ice::createProperties();>setProperty("Ice.Default.Router", "UClientServer/router:tcp -p 4063 -h -t 10000");>setProperty("Ice.ACM.Client", "0");>setProperty("Ice.RetryIntervals", "-1");

communicator_default = Ice::initialize(argc,0,InitData);
Glacier2::RouterPrx LoginRouter;
Glacier2::SessionPrx LoginTrySessionPrx;
Glacier2::RouterPrx LoginRouter = Glacier2::RouterPrx::uncheckedCast(m_communicator->getDefaultRouter());

Glacier2::SessionPrx LoginTrySessionPrx = NULL;
}catch(Ice::Exception &e)
CString reason = ChoujieclientApp::String2Wide(std::string(e.what()));
and the block in which exception occurs :
LoginTrySessionPrx = LoginRouter->createSession(username,password);

exception type is iceutil::NullHandleException

the server is wrien in java. i also got a client from my classmate which is writen in java,the java client are same configured as my mfc client .but it ran without any problems.

so any possibily reason can lead to my mfc app throwing the NullHandleException?
can anyone help me ?thx.


  • further information

    i have made it sure that in the block:
    Glacier2::RouterPrx LoginRouter = Glacier2::RouterPrx::uncheckedCast(m_communicator->getDefaultRouter());

    m_communicator->getDefaultRouter() return Null