.NET Service or Invoker not found

Hi,

I created a simple DA Server skeleton.

  1. When I run from VS2010 (debug mode), my client (Delphi) execute successfully any remote method.

  2. If I install service, and start it, ok it works.

  3. If I move server.exe to Linux (I am not sure if I can do it, but I can’t compile in mono yet, due to oxygene.exe errors) and execute server.exe:

mono-service2 Server.exe

I got a error (client side):
An exception was raised on the server: MyService not found

  1. If I execute Server.exe directly on Windows (not have a reason to do it, only to test…), new error:

An exception was raised on the server: Invoker method for test not found.

I thought this was related to EmbededResource:
http://connect.remobjects.com/discussion/1553/in-monoosx-the-custom-services-are-not-published

So I changed RODL Build Action from RODL to EmbededResource, but I got compile warning:

warning : Cannot merge RODL file Server.RODL; please change it’s BuildAction to ‘Rodl’.

And exe file decreased, and of course didn’t work :frowning:

Last note: In any situation when I type:
http://localhost:8099/BIN

my custom service is there …

I’m sure that I am missing something (something is missing in my exe file) but it is not clear to me …

Thanks
Willian.

Hello Willian.

Can you send us small testcase with the problem to investigate it in details?

Thanks in advance.

Hi andreyt,

I did some more tests …

Using:
Server (VS2010): RemObjects DA .NET - 6.0.57.993
Client (Delphi 7): RemObjects DA Delphi - 6.0.57.993

  1. RO-SDK server

OK, no error in Mono;

  1. RO-DA different errors:

Client Side:

A) Delphi 7 Client

  • if I generate client Intf from server URL I got some compilers erros (file with 5.600 lines): property Type:ScriptExceptionType read fType write fType;).
    If I comment those errors, runtime error : String list does not allow duplicates …

  • if I generate client Intf from RODL file. No compiler errors, no runtime errors. But a much more simple NewLibrary_Intf ( only 137 lines !!);

B) Tested server with two version of mono, with different errors:

  • Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)
    Error: DataService not found

  • Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-3)
    Error: A type load exception has occurred.

C)
I tested Mono 2.10.8.1 with .NET Client and same error:
An exception occurred on the server: A type load exception has occurred.

sample attached.

Thanks,
Willian.

Hi,

One more test:

  • compile server project (NET 4.0) under mono 2.10.8.1 (Linux) using Oxygene.exe. Generated smaller exe file (84K) than Windows (104K); OK!
  • running server as mono service (Linux); OK!

Client:
NET Client (Windows) - same error:
A type load exception has occurred.

Best regards,
Willian.

Hello Willian.

B) Tested server with two version of mono, with different errors:

  • Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)
    Error: DataService not found
  • Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-3)
    Error: A type load exception has occurred.
    C)
    I tested Mono 2.10.8.1 with .NET Client and same error:
    An exception occurred on the server: A type load exception has occurred.
    You need to add RO.Script reference and set Copy Local to true for all RO assemblies in the project. Otherwise app cannot find RemObjects assemblies on Mono and fails as it should. Another solution is to add RO assemblies to Mono GAC.

One more test:

  • compile server project (NET 4.0) under mono 2.10.8.1 (Linux) using Oxygene.exe. Generated smaller exe file (84K) than Windows (104K); OK!
    This happens because RODL file is not included into .exe file under linux. This won’t affect server functionality. However you can set the RODL’s BuildAction to EmbeddedResource to ensure that it is added to the generated .NET assembly under Linux as well.

NET Client (Windows) - same error:
A type load exception has occurred.
Please try to use solution above. If this exception is sent by server then it happens because not all assemblies are deployed.

The answers related to Delphi client problem will be sent soon.

Hope this helps.

Hello again.

  • if I generate client Intf from server URL I got some compilers erros (file with 5.600 >lines): property Type:ScriptExceptionType read fType write fType;).
    If I comment those errors, runtime error : String list does not allow duplicates …

The problem has been reproduced. Appropriate issue is registered as #55688

Thanks.

Hi Andreyt

andreyt said: You need to add RO.Script reference and set Copy Local to true for all RO assemblies in the project. Otherwise app cannot find RemObjects assemblies on Mono and fails as it should. Another solution is to add RO assemblies to Mono GAC.

Adding all assemblies to GAC worked… Where do I find RO.Script? Is this a file?

andreyt said: The problem has been reproduced. Appropriate issue is registered as #55688

What is the best way to generate delphi client intf file from .NET Servers? Import .RODL or from URL? I am asking this because using RODL generates much simpler intf file than importing from URL (140 lines versus 5.000 lines in my sample)…

Thank you very much for your help…

Willian.

Hello Willian.

Adding all assemblies to GAC worked… Where do I find RO.Script? Is this a file?

You need to add reference to RemObjects.Script assembly that is deployed with RemObject DataAbstract for .NET and placed in “C:\Program Files\RemObjects Software\Data Abstract for .NET\Bin”.

What is the best way to generate delphi client intf file from .NET Servers? Import .RODL or from URL? I am asking this because using RODL generates >much simpler intf file than importing from URL (140 lines versus 5.000 lines in my sample)…

If your server uses only DA/.NET services then there is no need to import RODL at all. In the other case better approach is to generate _Intf using Service Builder. Nowadays you can use either Import from local .RODL or from URL. The difference between them is different ways that are used to import service. When service is imported from URL it is unknown that some code is already implemented and no need to include it again. So that generated _Intf file is much bigger then if it is generated using Import from local .RODL.

Hope this helps.