Archived

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

object adapter requires configuration

Hi.
I am trying to create an IceBox application (AuthorizerService) to be deployed in IceGrid. As soon as I start AuthorizerService via IceGrid GUI it terminates with the following stack trace.

The exception is caused by the following command:
public void start ( string name, Communicator communicator, string[ ] args ) {
    this._adapter = communicator.createObjectAdapter ( name );
    //...
}

Stack trace:
!! 4/26/2010 18:07:40:390 AuthorizerServer: error: IceBox.FailureException
       reason = "ServiceManager: exception while starting service AuthorizerService: Ice.InitializationException
       reason = "object adapter `AuthorizerService' requires configuration"
      at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, String name, RouterPrx router, Boolean noConfig) in c:\Ice-Build\VC9\Release\cs\src\Ice\ObjectAdapterI.cs:line 899
      at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, RouterPrx router) in c:\Ice-Build\VC9\Release\cs\src\Ice\ObjectAdapterFactory.cs:line 132
      at Ice.CommunicatorI.createObjectAdapter(String name) in c:\Ice-Build\VC9\Release\cs\src\Ice\CommunicatorI.cs:line 69
      at DIAmatix.Services.TeamBuilder.Authorization.IBox.Authorizer.start(String name, Communicator communicator, String[] args) in H:\DIAmatix\TeamBuilder\src\authorization.svc\Authorization\Authorization.IBox\Authorizer.cs:line 21
      at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Ice-Build\VC9\Release\cs\src\IceBox\ServiceManagerI.cs:line 709"
      at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Ice-Build\VC9\Release\cs\src\IceBox\ServiceManagerI.cs:line 722
      at IceBox.ServiceManagerI.run() in c:\Ice-Build\VC9\Release\cs\src\IceBox\ServiceManagerI.cs:line 406
   Caused by: Ice.InitializationException
      at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, String name, RouterPrx router, Boolean noConfig) in c:\Ice-Build\VC9\Release\cs\src\Ice\ObjectAdapterI.cs:line 899
      at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, RouterPrx router) in c:\Ice-Build\VC9\Release\cs\src\Ice\ObjectAdapterFactory.cs:line 132
      at Ice.CommunicatorI.createObjectAdapter(String name) in c:\Ice-Build\VC9\Release\cs\src\Ice\CommunicatorI.cs:line 69
      at DIAmatix.Services.TeamBuilder.Authorization.IBox.Authorizer.start(String name, Communicator communicator, String[] args) in H:\DIAmatix\TeamBuilder\src\authorization.svc\Authorization\Authorization.IBox\Authorizer.cs:line 21
      at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Ice-Build\VC9\Release\cs\src\IceBox\ServiceManagerI.cs:line 709

By the way, I have created application in the IceGrid GUI manually.

Comments

  • mes
    mes California
    Hi Dmitry,

    The error message in the reason field indicates that you have created an object adapter named AuthorizerService but you have not defined any configuration properties for this adapter. When you create an adapter using createObjectAdapter, the adapter requires that at least one property be defined. Normally you would define at least the adapter.Endpoints property.

    It's also possible that you have misspelled the adapter name or its configuration properties. This error also helps developers avoid problems caused by such misspellings.

    Regards,
    Mark
  • When using IceGrid GUI I have changed the name of the adapter from, say, "MyAdapter" to ${service} variable everything starts working...

    Broken way: ${server}.${service}.MyAdapter

    Working way: ${server}.${service}.${service}-adapter

    PS:
    Obviously I do not understand adapter naming rules.

    Thank you, Mes.
  • bernard
    bernard Jupiter, FL
    Hi Dmitry,

    Perhaps you are confusing adapter names with adapter IDs?

    The adapter name is only used to distinguish object adapters within a communicator, and to associate configuration with this object adapter. This name passed as the parameter to createObjectAdapter() and must match the adapter name you use in the configuration.

    An adapter ID uniquely identifies an indirect object adapter with an IceGrid deployment.

    Typically, you would use a simple string like "AuthorizationAdapter" for your adapter name, and a more unique string for the adapter ID (such as ${server}.${service}.AuthorizationAdapter). This adapter ID is just in the configuration and not in your code.

    I hope this is clearer now!

    Cheers,
    Bernard
  • Hi, Bernard!

    Thank you for clarification!

    With regards,
    Dmitry.