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

Ice.InitializationException: null (in Ice.ObjectAdapterI)

What does Ice.InitializationException: null (in Ice.ObjectAdapterI) mean? When I run

communicator = Ice.Util.initialize();
Ice.ObjectPrx obj = communicator.stringToProxy(Proxy1);
IceStorm.TopicManagerPrx topicManager = IceStorm.TopicManagerPrxHelper.checkedCast(obj);

Ice.ObjectAdapter adapter = communicator.createObjectAdapter("MonitorAdapter");
monitor = new PsmTopicIntfI(); //creates the monitor that waits for the signal
proxy = adapter.addWithUUID(monitor).ice_oneway();
topic = null;

I get it when it tries to create the adapter (MonitorAdapter) this code is almost word for word exactly the same as that in the online documentation for creating a subscriber in icestorm. Any thoughts?


  • mes
    mes California

    Welcome to the forum.

    It would be easier for us to track down the reason for this exception if you posted the complete stack trace of the exception.

  • Stack trace

    reason = "object adapter `MonitorAdapter' requires configuration"
    at Ice.ObjectAdapterI.<init>(
    at IceInternal.ObjectAdapterFactory.createObjectAdapter(
    at Ice.CommunicatorI.createObjectAdapter(
    at PsmConnection.<init>(

    Here is the entire returned error.
  • No config for your adapter! ---> reason = "object adapter `MonitorAdapter' requires configuration"

    Where your config for adapter 'MonitorAdapter'?
  • communicator and ObjectAdapter

    I think the root of the problem is that in the documentation online that I looked at for the subscriber you say "Ice.CommunicatorPtr" and "Ice.ObjectAdapterPtr" where as I drop out the ptr because the version of ice I installed has no ptr files. Why do you use them online when I can't find them anywhere (with a search) under the ice installation? Why do some of the more basic programs in your online documentation drop the "ptr" as I did? For example Writing an Ice Application with Java - Ice 3.4 - ZeroC this basic client server setup drops the ptr but this one Implementing an IceStorm Subscriber - Ice 3.4 - ZeroC uses it. Why?
  • bernard
    bernard Jupiter, FL
    Hi Dustin,

    The Ptrs are "smart points" used in the C++ mapping; in Java, there is no need for smart pointers (Java references are already 'smart'), so there is no Ptr.

    As cnhome pointed out, the issue here is that you didn't provide configuration for your object adapter--at a minimum, you need to set the .Endpoints property, for example:
    #Ice config file
    MonitorAdapter.Endpoints=tcp -h * -p 10000

    Alternatively (if you don't want to write any config), you could use createObjectAdapterWithEndpoints.

    Best regards,
  • Online Code

    The code online for a java subscriber still uses ObjectAdapterPtr though. Also in the code online they never create a configuration for the adapter... here is the site I'm referencing Implementing an IceStorm Subscriber - Ice 3.4 - ZeroC and here is the code:

    Ice.ObjectPrx obj = communicator.stringToProxy("IceStorm/TopicManager:tcp -p 9999");
    IceStorm.TopicManagerPrx topicManager = IceStorm.TopicManagerPrxHelper.checkedCast(obj);

    Ice.ObjectAdapterPtr adapter = communicator.createObjectAdapter("MonitorAdapter");

    Monitor monitor = new MonitorI();
    Ice.ObjectPrx proxy = adapter.addWithUUID(monitor).ice_oneway();

    Thanks for all the help! I'm taking your advice with my code I just wanted to clarify the "why" aspect a bit more