Results 1 to 7 of 7

Thread: Ice.InitializationException: null (in Ice.ObjectAdapterI)

  1. #1
    deaxman is offline Registered User
    Name: Dustin Axman
    Organization: LLE
    Project: Sending Scope data over a connection
    Join Date
    Dec 2011
    Posts
    4

    Ice.InitializationException: null (in Ice.ObjectAdapterI)

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

    communicator=null;
    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?

  2. #2
    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
    1,445
    Hi,

    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.

    Thanks,
    Mark

  3. #3
    deaxman is offline Registered User
    Name: Dustin Axman
    Organization: LLE
    Project: Sending Scope data over a connection
    Join Date
    Dec 2011
    Posts
    4

    Stack trace

    Ice.InitializationException
    reason = "object adapter `MonitorAdapter' requires configuration"
    at Ice.ObjectAdapterI.<init>(ObjectAdapterI.java:884)
    at IceInternal.ObjectAdapterFactory.createObjectAdapt er(ObjectAdapterFactory.java:130)
    at Ice.CommunicatorI.createObjectAdapter(Communicator I.java:77)
    at PsmConnection.<init>(PsmConnection.java:32)


    Here is the entire returned error.

  4. #4
    cnhome is offline Registered User
    Name: Li Wenzhi
    Organization: FreeLaner
    Project: Train Enquiries for Android
    Join Date
    Apr 2005
    Location
    Beijing, China
    Posts
    64

    Red face

    No config for your adapter! ---> reason = "object adapter `MonitorAdapter' requires configuration"

    Where your config for adapter 'MonitorAdapter'?

  5. #5
    deaxman is offline Registered User
    Name: Dustin Axman
    Organization: LLE
    Project: Sending Scope data over a connection
    Join Date
    Dec 2011
    Posts
    4

    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?

  6. #6
    bernard's Avatar
    bernard is online now ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    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:

    Code:
    #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,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  7. #7
    deaxman is offline Registered User
    Name: Dustin Axman
    Organization: LLE
    Project: Sending Scope data over a connection
    Join Date
    Dec 2011
    Posts
    4

    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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AsyncResult::getConnection() returns NULL?!
    By lorin.liu in forum Help Center
    Replies: 6
    Last Post: 12-03-2011, 11:42 AM
  2. why is my Ice.Application.communicator() is null?
    By cnhome in forum Help Center
    Replies: 1
    Last Post: 07-01-2010, 11:26 PM
  3. Ice.Current.hashCode() can throw a NPE on null enum
    By joshmoore in forum Bug Reports
    Replies: 1
    Last Post: 08-20-2007, 03:46 AM
  4. null sequence in C#
    By chris92 in forum Help Center
    Replies: 3
    Last Post: 09-29-2006, 08:58 AM
  5. Replies: 4
    Last Post: 12-16-2005, 06:20 AM

Tags for this Thread

Posting Permissions

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