Results 1 to 4 of 4

Thread: IceStorm Publishing Error

  1. #1
    aerowyn is offline Registered User
    Join Date
    Nov 2004
    Posts
    15

    IceStorm Publishing Error

    Im getting the following error when I attempt to publish to IceStorm:

    Code:
    [ IceStorm: Topic: Subscribe: 0f84d13a-a850-45d8-8c5a-afe9b7a54b7d ]
    [ IceStorm: Subscriber: 0f84d13a-a850-45d8-8c5a-afe9b7a54b7d: publish failed: .\LocatorInfo.cpp:337: Ice::NotRegisteredException:
       no object with id `0f84d13a-a850-45d8-8c5a-afe9b7a54b7d' is registered ]
    Here is the code I am using on the publisher:

    Code:
    Ice::ObjectPrx obj = Ice::Application::communicator()->stringToProxy("IceStorm/TopicManager");
    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(obj);
    IceStorm::TopicPrx topic;
    
    try
    {
    	topic = topicManager->retrieve("Location");
    }
    
    catch (const IceStorm::NoSuchTopic&)
    {
    	cout << "No such topic" << endl;
    	//topic = topicManager->create("Weather");
    }
    
    Ice::ObjectPrx pub = topic->getPublisher();
    if (!pub)
    {
    	cout << "pub failed" << endl;
    }
    	
    //if (!pub->ice_isDatagram()) 
    	pub = pub->ice_oneway();
    	
    Demo::StormPrx monitor = Demo::StormPrx::uncheckedCast(pub);
    
    monitor->tick();
    And on the subscriber:

    Code:
    IcePack::QueryPrx query = IcePack::QueryPrx::checkedCast(communicator->stringToProxy("IcePack/Query"));
    Ice::ObjectPrx obj = query->findObjectByType("::IceStorm::TopicManager");
    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(obj);
    Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("MonitorAdapter");
    StormPtr monitor = new StormI;
    Ice::ObjectPrx proxy = adapter->addWithUUID(monitor);
    adapter->activate();
    	
    IceStorm::TopicPrx topic;
    
    try
    {
    	topic = topicManager->retrieve("Location");
    	IceStorm::QoS qos;
    	topic->subscribe(qos, proxy);
    }
    
    catch (const IceStorm::NoSuchTopic&)
    {
    	// Error! No topic found!
    	cout << "No such topic!" << endl;
    	cout << "Creating..." << endl;
    	topic = topicManager->create("Location");
    	IceStorm::QoS qos;
    	topic->subscribe(qos, proxy);
    }
    I am loading IceStorm with IceBox through IcePack behind a Glacier2 router. Here is the descriptor:

    Code:
    <server name="IceStorm" kind="cpp-icebox" endpoints="tcp -h 127.0.0.1 -p 10000" activation="on-demand">
      <service name="IceStorm" entry="IceStormService,21:create">
      <dbenv name="${service}" /> 
        <adapters>
          <adapter name="${service}.TopicManager" endpoints="tcp">
            <object identity="${service}/TopicManager" type="::IceStorm::TopicManager" /> 
          </adapter>
          <adapter name="${service}.Publish" endpoints="tcp" /> 
       </adapters>
       <properties>
         <property name="IceStorm.Trace.Subscriber" value="1" /> 
         <property name="IceStorm.Trace.TopicManager" value="2" /> 
         <property name="IceStorm.Trace.Topic" value="1" /> 
       </properties>
      </service>
    </server>

    Any suggestions?

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    The exception "Ice::NotRegisteredException: no object with id `0f84d13a-a850-45d8-8c5a-afe9b7a54b7d' is registered" indicates that the proxy for your subscriber doesn't have any endpoints or doesn't refer to any adapter id.

    What is the configuration of your subscriber? Is the subscriber connected to IceStorm through Glacier2? If that's the case I assume you also want the communications from the IceStorm service to your client to go through the Glacier2 service. You need to configure your subscriber object adapter to use the Glacier2 router. Proxies created with this object adapter will contain the endpoints to route the request through the Glacier2 service.

    I recommend you to take a look at the implementation of the Chat demo included with the Ice newsletter. In the issue 6 for example we demonstrate a very similar deployment. The configuration of the Chat client and your subscriber should be very similar.

    Benoit.

  3. #3
    aerowyn is offline Registered User
    Join Date
    Nov 2004
    Posts
    15
    Thanks for your help Benoit, but I am unsure of how to configure the obeject adaptor to use Glacier2, but at least I have the subscribing working.

    I changed the adaptor name to Test.Subscriber and added Test.Subscriber.Endpoints=tcp to the config file.

    How could I change this to use glacier2?

  4. #4
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    I wrote extensively about Glacier 2 in the first two issues of Connections. I suggest you read my two articles, and then if you have further questions ask away.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IceStorm: Publishing my own class
    By ShaChris23 in forum Help Center
    Replies: 3
    Last Post: 10-28-2009, 05:48 PM
  2. Publishing to replicated IceStorms
    By bigtim in forum Help Center
    Replies: 4
    Last Post: 02-13-2008, 11:19 AM
  3. Connections newsletter now publishing bi-monthly
    By mes in forum Announcements
    Replies: 0
    Last Post: 08-22-2007, 10:12 AM
  4. Error during launching IceStorm
    By Sameerrele in forum Help Center
    Replies: 6
    Last Post: 08-11-2006, 08:44 AM
  5. IceStorm error reporting hook
    By shaver in forum Comments
    Replies: 7
    Last Post: 01-19-2004, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •