Im getting the following error when I attempt to publish to IceStorm:
Here is the code I am using on the publisher: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 ]
And on the subscriber: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();
I am loading IceStorm with IceBox through IcePack behind a Glacier2 router. Here is the descriptor: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); }
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?

Reply With Quote