Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-02-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
Ice::Plugin && Ice::LoggerPlugin

hi, I try to make a plugin for send the logs messages to an icestorm service

but when i try to do the checkedCast I receive an exception ( icestorm service is up because is used from other client)

the exception is that:
Ice::Excetpion : Reference.cpp:1585: Ice::NoEndpointException:
no suitable endpoint available for proxy `MyStorm/TopicManager -t @ StormAdapter'

Code:
void
IceLoggerPlugin::initialize()
{
       ...
        try
        {
                IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(m_com->stringToProxy(props->getProperty("Log.topicManagerPrx") ));
        }
        catch(Ice::Excetpion& ex )
        {
                cout << "  Ice::Excetpion : "<< ex.what()  << endl;
        }

}
Reply With Quote
  #2 (permalink)  
Old 10-02-2008
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 976
Hi Andrew,

Your plugin is attempting to use an indirect proxy, which requires that the communicator be configured with a locator. However, Ice does not configure the communicator's default locator until after the plugins are initialized. This is necessary because the locator's proxy might use endpoints that depend on a transport plugin.

You should be able to work around this by manually configuring your proxy with a locator. For example:
Code:
Ice::ObjectPrx obj =
    m_com->stringToProxy(props->getProperty("Ice.Default.Locator"));
Ice::LocatorPrx locator = Ice::LocatorPrx::checkedCast(obj);
obj = m_com->stringToProxy(props->getProperty("Log.topicManagerPrx"));
obj = obj->ice_locator(locator);
IceStorm::TopicManagerPrx topicManager =
    IceStorm::TopicManagerPrx::checkedCast(obj);
Also note that if your logger uses SSL, you must ensure that the IceSSL plugin is loaded before your logger plugin.

Hope that helps,
Mark
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Documentation bug (C++ argument calculation order && exception safety) Andrew S Bug Reports 13 05-08-2008 09:38 AM
visual Studio & ice 3.0 & Global Assembly Cache loheron Help Center 7 11-23-2006 08:39 AM
Communication problems between Glacier2 router & PermissionVerifier & SessionManager Nis Baggesen Help Center 22 02-07-2006 09:12 AM
Using ICE in .NET 1.1 && .NET 2.0 dmitry.medvedev Help Center 8 01-27-2006 04:48 AM
Ice && crob jobs xdm Help Center 2 09-23-2004 10:04 AM


All times are GMT -4. The time now is 05:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.