Results 1 to 5 of 5

Thread: object adapter requires configuration

  1. #1
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12

    object adapter requires configuration

    Hey,

    I am trying to start my icegrid and keep getting the 'object adapter '{ServiceName} requires configuration' error message.

    my application config is :

    <?xml version="1.0" encoding="utf-8"?>
    <icegrid>
    <application name="HelloBartService">
    <service-template id="HelloBartService">
    <parameter name="name" />
    <parameter name="binPath" />
    <service name="${name}" entry="helloservice.dll:HelloServiceI">
    <description>Barts Service</description>
    <properties>
    <property name="Hello.Identity" value="hello" />
    </properties>
    <adapter name="HelloBartService-${name}" endpoints="default" id="HelloBartService-${name}" replica-group="HelloBartServicegroup" server-lifetime="false" />
    </service>
    </service-template>
    <server-template id="Glacier2">
    <parameter name="instance-name" default="${application}.Glacier2" />
    <parameter name="client-endpoints" />
    <parameter name="server-endpoints" />
    <parameter name="session-timeout" default="0" />
    <server id="${instance-name}" activation="manual" exe="glacier2router">
    <properties>
    <property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
    <property name="Glacier2.Client.Endpoints" value="${client-endpoints}" />
    <property name="Glacier2.Server.Endpoints" value="${server-endpoints}" />
    <property name="Glacier2.InstanceName" value="${instance-name}" />
    <property name="Glacier2.SessionTimeout" value="${session-timeout}" />
    </properties>
    </server>
    </server-template>
    <replica-group id="HelloBartServicegroup">
    <load-balancing type="random" n-replicas="2" />
    <object identity="hello" type=":emo::Hello" />
    </replica-group>
    <node name="RonsMachine">
    <server-instance template="Glacier2" instance-name="DemoGlacier3" client-endpoints="tcp -h localhost -p 4063" server-endpoints="tcp">
    <properties>
    <property name="Glacier2.SessionManager" value="RonsReg/AdminSessionManager" />
    <property name="Glacier2.PermissionsVerifier" value="DemoGlacier3/NullPermissionsVerifier" />
    </properties>
    </server-instance>
    <icebox id="IceBox" activation="on-demand" exe="iceboxnet.exe">
    <description>Barts Service</description>
    <properties>
    <property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
    <property name="IceBox.InstanceName" value="${server}" />
    <property name="IceBox.Trace.ServiceObserver" value="1" />
    </properties>
    <service-instance template="HelloBartService" name="Bart0" binPath="C:\IceGrid\icebox" />
    <service-instance template="HelloBartService" name="Bart1" binPath="C:\IceGrid\icebox" />
    </icebox>
    </node>
    </application>
    </icegrid>


    I have looked in the icegrid admin gui and it appears that the service entry point paths are absolute ... and wrong!

    i.e. C:\IceGrid\icebox\\helloService.dll:HelloServiceI (too many \\'s)

    where does it pick this address up from?

    I have tried changing the above application config to include an absolute address and it doesn't seem to filter through to the GUI.

    Any help would be appreciated

    Cheers

    Ronnie

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Ronnie,

    I am trying to start my icegrid and keep getting the 'object adapter '{ServiceName} requires configuration' error message.
    This indicates a mismatch between the object adapter name in your code and the object adapter name in your configuration. It sounds like your code is using {ServiceName} as object adapter name, when you'd want something like "HelloBartServicegroup-Bart0". The implementation of createObjectAdapter does not perform any substitution on the name you provide.

    I have looked in the icegrid admin gui and it appears that the service entry point paths are absolute ... and wrong!

    i.e. C:\IceGrid\icebox\\helloService.dll:HelloServiceI (too many \\'s)
    This is unrelated to the object adapter name mismatch above.

    Where do you see this string with too many \\? In the generated configuration file? In the 'Live deployment' tab of the IceGrid Admin GUI?

    Could you also post your actual IceGrid XML descriptor? The one in your first post does not use binPath for the entry value.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12
    Hey Bernard,

    Sorry if I added confusion with the quotes. The error message does state the correct service group of "object adapter 'Hello-Bart0' requires configuration'. I placed the {ServiceName} comment in as it appears to occur with any service I create.

    my descriptor config is as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <icegrid>
    <application name="HelloBartService">
    <service-template id="HelloBartService">
    <parameter name="name" />
    <parameter name="binPath" />
    <service name="${name}" entry="${binPath}helloService.dll:HelloServiceI">
    <description>Barts Service</description>
    <properties>
    <property name="Hello.Identity" value="hello" />
    </properties>
    <adapter name="HelloBartService-${name}" endpoints="default" id="HelloBartService-${name}" replica-group="HelloBartServicegroup" server-lifetime="false" />
    </service>
    </service-template>
    <server-template id="Glacier2">
    <parameter name="instance-name" default="${application}.Glacier2" />
    <parameter name="client-endpoints" />
    <parameter name="server-endpoints" />
    <parameter name="session-timeout" default="0" />
    <server id="${instance-name}" activation="manual" exe="glacier2router">
    <properties>
    <property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
    <property name="Glacier2.Client.Endpoints" value="${client-endpoints}" />
    <property name="Glacier2.Server.Endpoints" value="${server-endpoints}" />
    <property name="Glacier2.InstanceName" value="${instance-name}" />
    <property name="Glacier2.SessionTimeout" value="${session-timeout}" />
    </properties>
    </server>
    </server-template>
    <replica-group id="HelloBartServicegroup">
    <load-balancing type="random" n-replicas="2" />
    <object identity="hello" type=":emo::Hello" />
    </replica-group>
    <node name="SE101269">
    <server-instance template="Glacier2" instance-name="DemoGlacier3" client-endpoints="tcp -h localhost -p 4063" server-endpoints="tcp">
    <properties>
    <property name="Glacier2.SessionManager" value="RonsReg/AdminSessionManager" />
    <property name="Glacier2.PermissionsVerifier" value="DemoGlacier3/NullPermissionsVerifier" />
    </properties>
    </server-instance>
    <icebox id="IceBox" activation="on-demand" exe="iceboxnet.exe">
    <description>Barts Service</description>
    <properties>
    <property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
    <property name="IceBox.InstanceName" value="${server}" />
    <property name="IceBox.Trace.ServiceObserver" value="1" />
    </properties>
    <service-instance template="HelloBartService" name="Bart0" binPath="C:\IceTest\" />
    <service-instance template="HelloBartService" name="Bart1" binPath="C:\IceTest\" />
    </icebox>
    </node>
    </application>
    </icegrid>

    my node config is as follows:

    #
    # Node properties

    IceGrid.Node.Endpoints=tcp
    IceGrid.Node.Name=SE101269
    IceGrid.Node.Data=c:\icegrid\icebox\db
    Ice.Default.Locator=RonsReg/Locator:tcp -h LN7S9438 -p 50001


    and my registry config is as follows:

    #
    # The IceGrid instance name.
    #
    IceGrid.InstanceName=RonsReg

    #
    # The IceGrid locator proxy.
    #
    Ice.Default.Locator=RonsReg/Locator:tcp -h LN7S9438 -p 50001

    #
    # IceGrid registry configuration.
    #
    IceGrid.Registry.Client.Endpoints=tcp -h LN7S9438 -p 50001
    IceGrid.Registry.Server.Endpoints=tcp
    IceGrid.Registry.Internal.Endpoints=tcp

    #
    # Enable the admin session manager for use with Glacier2.
    #
    IceGrid.Registry.AdminSessionManager.Endpoints=tcp

    IceGrid.Registry.Data=C:\IceGrid\icebox\db/master
    IceGrid.Registry.PermissionsVerifier=RonsReg/NullPermissionsVerifier
    IceGrid.Registry.AdminPermissionsVerifier=RonsReg/NullPermissionsVerifier
    IceGrid.Registry.SSLPermissionsVerifier=RonsReg/NullSSLPermissionsVerifier
    IceGrid.Registry.AdminSSLPermissionsVerifier=RonsR eg/NullSSLPermissionsVerifier

    #
    # Dummy username and password for icegridadmin.
    #
    IceGridAdmin.Username=foo
    IceGridAdmin.Password=bar

    as for the too many "\\"s it appears only in the adminGUI as you can see from my config, the extra slash is not present for binPath

  4. #4
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12
    I fixed it!

    it turns out there was a mismatch in names ...

    in the config I was stating "HelloBartService-${name}"

    however in the Service code I was using :

    _adapter = communicator.createObjectAdapter("Hello-" + name);

    therefore I simply changed it to :

    _adapter = communicator.createObjectAdapter("HelloBartService-" + name);

    and it worked.

  5. #5
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Ronnie,

    as for the too many "\\"s it appears only in the adminGUI as you can see from my config, the extra slash is not present for binPath
    This could be a small bug.

    Keep in mind that in config files, backslash is the escape character. So '\\' in a config file is the encoding for a single '\'. This is fully documented here: http://www.zeroc.com/doc/Ice-3.4.1-I...ties.31.3.html

    In config files, \ in front of most characters is preserved; the exceptions are '#', '=', '\' and whitespace.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. object adapter requires configuration
    By dmitry.medvedev in forum Help Center
    Replies: 4
    Last Post: 04-27-2010, 04:06 PM
  2. Replies: 4
    Last Post: 10-16-2009, 06:42 PM
  3. Find object in object adapter by its proxy
    By dnnbg in forum Help Center
    Replies: 2
    Last Post: 02-25-2009, 04:09 AM
  4. Replicated Object Adapter
    By vsonnathi in forum Help Center
    Replies: 3
    Last Post: 04-13-2005, 03:30 PM
  5. how to get an object adapter from the communicator
    By paulling in forum Help Center
    Replies: 1
    Last Post: 11-26-2003, 12:29 AM

Posting Permissions

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