Results 1 to 4 of 4

Thread: Ice.ObjectNotExistException while using findObjectByType

  1. #1
    Sivaprakash is offline Registered User
    Name: Sivaprakash Selvaraj
    Organization: HTC Global Services
    Project: GOLD
    Join Date
    Apr 2006
    Posts
    6

    Ice.ObjectNotExistException while using findObjectByType

    Ice.ObjectNotExistException is thrown while printing the ice_id of the object proxy in the following code fragment.(This exception is thrown when any of the method from that proxy is called.) It works fine when the locator and endpoint are used to obtain the proxy instance.
    Following is the code that is querying the object proxy.

    Ice.ObjectPrx proxy = notifier.communicator.stringToProxy("IceGrid/Query");
    IceGrid.QueryPrx query = IceGrid.QueryPrxHelper.checkedCast(proxy);
    ObjectPrx objProxy = query.findObjectByType("::fca::search::agent::Matr ixSearchICE");
    System.out.println(objProxy.ice_id());

    Please let me know what am I missing here. Let me know if you need anymore info.

    Following is the stack trace.
    Ice.ObjectNotExistException
    id.name = "tg-dxsearch1.SearchServer"
    id.category = ""
    facet = ""
    operation = "ice_id"
    at IceInternal.Outgoing.invoke(Outgoing.java:148)
    at Ice._ObjectDelM.ice_id(_ObjectDelM.java:138)
    at Ice.ObjectPrxHelperBase.ice_id(ObjectPrxHelperBase .java:145)
    at Ice.ObjectPrxHelperBase.ice_id(ObjectPrxHelperBase .java:132)

    Here is the fragment from the deployment descriptor.

    ..........
    <service name="CubeSearch" entry="cube_search:create">
    <adapter name="${service}" endpoints="${endpoints}" replica-group="theCubeSearchAdapter" >
    <object identity="${id}" type= "::fca::search::agent::MatrixSearchICE" />
    </adapter>

    .........
    Thanks & Regards,
    Sivaprakash Selvaraj,
    HTC Global Services (www.htcinc.com).
    Working for Thomson Gale

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Is the object registered on the correct object adapter? If you turn on network tracing (or protocol tracing) does the invocation go to an appropriate server and endpoint?

  3. #3
    Sivaprakash is offline Registered User
    Name: Sivaprakash Selvaraj
    Organization: HTC Global Services
    Project: GOLD
    Join Date
    Apr 2006
    Posts
    6

    Enabled network as well as protocol trace.

    I enabled the network as well as protocol trace. I wrote two sample clients to obtain the object proxy. One is using findObjectByType and the other is the usual way of getting it. I am using the same communicator instance for both.
    Thank you for your patience to scroll down the trace.

    Using findObjectByType (Exception is thrown)
    ....
    Ice.ObjectPrx proxy = communicator.stringToProxy("IceGrid/Query");
    IceGrid.QueryPrx query = IceGrid.QueryPrxHelper.checkedCast(proxy);
    ObjectPrx objProxy = query.findObjectByType("::fca::search::agent::Matr ixSearchAgentICE");
    System.out.println(objProxy.ice_id());

    Trace for the above code. (Exception is thrown.)
    [ Network: trying to establish tcp connection to 10.160.36.44:12000 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1726
    remote address = 10.160.36.44:12000 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 72
    request id = 1
    identity = IceGrid/Locator
    facet =
    operation = findObjectById
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 73
    request id = 1
    reply status = 0 (ok) ]
    [ Network: trying to establish tcp connection to 10.160.36.44:12000 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1733
    remote address = 10.160.36.44:12000 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 66
    request id = 1
    identity = IceGrid/Query
    facet =
    operation = ice_isA
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 26
    request id = 1
    reply status = 0 (ok) ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 101
    request id = 2
    identity = IceGrid/Query
    facet =
    operation = findObjectByType
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 104
    request id = 2
    reply status = 0 (ok) ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 107
    request id = 2
    identity = IceGrid/Locator
    facet =
    operation = findAdapterById
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 78
    request id = 2
    reply status = 0 (ok) ]
    [ Network: trying to establish tcp connection to 10.160.36.28:11001 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1735
    remote address = 10.160.36.28:11001 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 61
    request id = 1
    identity = tg-dxsearch1.SearchServer
    facet =
    operation = ice_id
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 54
    request id = 1
    reply status = 2 (object not exist)
    identity = tg-dxsearch1.SearchServer
    facet =
    operation = ice_id ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 61
    request id = 2
    identity = tg-dxsearch1.SearchServer
    facet =
    operation = ice_id
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 54
    request id = 2
    reply status = 2 (object not exist)
    identity = tg-dxsearch1.SearchServer
    facet =
    operation = ice_id ]
    Ice.ObjectNotExistException
    id.name = "tg-dxsearch1.SearchServer"
    id.category = ""
    facet = ""
    operation = "ice_id"
    at IceInternal.Outgoing.invoke(Outgoing.java:148)
    at Ice._ObjectDelM.ice_id(_ObjectDelM.java:138)
    at Ice.ObjectPrxHelperBase.ice_id(ObjectPrxHelperBase .java:145)
    at Ice.ObjectPrxHelperBase.ice_id(ObjectPrxHelperBase .java:132)


    Usual way of obtaining the object proxy (Works fine.)
    ObjectPrx objProxy = communicator.stringToProxy("CubeSearch@theCubeSear chAdapter");
    System.out.println("***** ID : " +objProxy.ice_id() + "******");

    [ Network: trying to establish tcp connection to 10.160.36.44:12000 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1766
    remote address = 10.160.36.44:12000 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 72
    request id = 1
    identity = IceGrid/Locator
    facet =
    operation = findObjectById
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 73
    request id = 1
    reply status = 0 (ok) ]
    [ Network: trying to establish tcp connection to 10.160.36.44:12000 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1771
    remote address = 10.160.36.44:12000 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 66
    request id = 1
    identity = IceGrid/Query
    facet =
    operation = ice_isA
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 26
    request id = 1
    reply status = 0 (ok) ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 80
    request id = 2
    identity = IceGrid/Locator
    facet =
    operation = findAdapterById
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 78
    request id = 2
    reply status = 0 (ok) ]
    [ Network: trying to establish tcp connection to 10.160.36.28:11001 ]
    [ Network: tcp connection established
    local address = 140.244.107.18:1772
    remote address = 10.160.36.28:11001 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 46
    request id = 1
    identity = CubeSearch
    facet =
    operation = ice_id
    mode = 1 (nonmutating)
    context = ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 68
    request id = 1
    reply status = 0 (ok) ]
    ***** ID : ::fca::search::agent::MatrixSearchAgentICE******
    Thanks & Regards,
    Sivaprakash Selvaraj,
    HTC Global Services (www.htcinc.com).
    Working for Thomson Gale

  4. #4
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    As indicated in the Ice.ObjectNotExistException, the identity of the proxy returned by findObjectByType is "tg-dxsearch1.SearchServer".

    This identity is different from the identity that you're using in your stringToProxy call: "CubeSearch@theCubeSearchAdapter", here, the identity is "CubeSearch".

    So, I assume the first identity is incorrect since it works when you create the proxy with the communicator. Shouldn't you set the identity in the object descriptor to "CubeSearch" instead of "${id}"?

    That is:

    Code:
    <object identity="CubeSearch" type= "::fca::search::agent::MatrixSearchICE" />
    The identity here should be set to the same value as the one used in the server to register the object with the object adapter.

    Let us know if this doesn't solve your problem!

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 03-07-2011, 03:09 AM
  2. ObjectNotExistException in callback
    By StephanS in forum Help Center
    Replies: 2
    Last Post: 12-14-2009, 02:25 PM
  3. Replies: 12
    Last Post: 05-11-2009, 11:21 AM
  4. Replies: 2
    Last Post: 07-14-2008, 11:37 AM
  5. indirect proxy and ObjectNotExistException
    By rc_hz in forum Comments
    Replies: 6
    Last Post: 12-06-2006, 07:14 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
  •