Archived

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

Ice.ObjectAdapterDeactivatedException with multiple Object Adapters

I keep getting this error while running test server for unit testing purporses.

Ice.ObjectAdapterDeactivatedException
name = (null)
at IceInternal.ObjectAdapterFactory.createObjectAdapter(ObjectAdapterFactory.java:159)
at Ice.CommunicatorI.createObjectAdapter(CommunicatorI.java:71)
at (MainEventDispatcher.java:140)

Line number 40 is the second createObjectAdapter statement.

ObjectAdapter objectAdapter = communicator.createObjectAdapter("ABCAdapter");
objectAdapter.activate();

ObjectAdapter objectAdapter2 = communicator.createObjectAdapter("XYZAdapter");
objectAdapter2.activate();

Here is the server config file

Ice.Default.Locator=LISCoreGrid/Locator:tcp -h localhost -p 4061:ssl -h localhost -p 4062
ABCAdapter.AdapterId=ABCAdapter
ABCAdapter.Endpoints=tcp
XYZAdapter.AdapterId=XYZAdapter
XYZAdapter.Endpoints=tcp

The funny thing is if I deploy this application using iceadmin I do not get this error. This only happens for running a test server.
Also the test server used to work fine but recently I changed the grid name and this start to happen. I already clear out all the nodes and registry files and restarted them.

Anyone know what is going on?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    This exception indicates that the the communicator shutdown method has been called already. So finding what might be calling the communicator shutdown() method concurrently should solve your issue. If you're not sure what could be calling this method, you should tell us a bit more about your server: is it using Ice::Service or Ice::Application? or is it deployed with IceGrid?

    Also, please specify with Ice version and operating system you're using.

    Cheers,
    Benoit.
  • Yeah I fixed the problem. The unit test was running way too fast after the SSL configuration was added. I gave it more time to setup and it works fine now.

    Thanks

    Frank LIu