UXMLREADER on Application server not available?

Author: dammie@seznam.cz (dammie)

Hello,   I created comp service for loading xml, if I run it on my local pc it runs ok... but if I run it on application server after activate i v got error -57 :( newinstance "UXMLREADER", vReader activate vReader.setHandler($instancename)  

-57

UACTERR_NO_INSTANCE

The named instance cannot be found in the component pool.

Any hint? Thanks.. :(

1 Comment

  1. This is a "tricky" one. Confused The problem here is that the UXMLREADER cannot find the instance of the current instance ($instancename) where the SAX Callback Operations are defined. The reason for this is that the UXMLREADER instance is (probably) running in a different context then the current instance. When you activate a service remotely (that runs on a UServer) then the service instance is actually created in the context of the client (and not the UServer) - and any instance that is created from the "remote" instance is running in the context of the server. The problem can be resolved if the component with the SAX Callback Operations is instantiated on the server. E.g. when the Callback Operations are defined in a service called SAX_HANDLER and an operation of the remotely executed service SVC1 is called with the following code:

    newinstance "UXMLREADER", vReader
    newinstance "SAX_HANDLER", "SAX_HANDLER"
    activate vReader.setHandler("SAX_HANDLER")

    Then everything should work fine. It is btw possible to transfer an instance identification between contexts by using handles, but unfortunately the UXMLREADER operation setHandler (currently) does not accept instance handles. Hope this helps. Kind regards, Daniel Iseli Uniface Support


    Author: diseli (daniel.iseli@uniface.com)