mamcx
(mamcx)
May 3, 2012, 1:22am
1
I publish a DA server on heroku (Ubuntu 10.04), and get:
An exception occurred on the server: Invoker method for new_clientdb not found.
2012-05-02T23:16:46+00:00 heroku[router]: POST bestsellercloud.herokuapp.com/bin dyno=web.1 queue=0 wait=0ms service=19ms status=200 bytes=71
2012-05-02T23:16:48+00:00 app[web.1]: System.EventArgsError: RemObjects.SDK.Exceptions.ServerSetupException: Invoker method for new_clientdb not found.
2012-05-02T23:16:48+00:00 app[web.1]: at RemObjects.SDK.Server.Invoker.InvokeMethod (IMessage aMessage, IServerChannelInfo aChannel, IClassFactory aClassfactory) [0x00000] in :0
2012-05-02T23:16:48+00:00 app[web.1]: at RemObjects.SDK.Server.Invoker.InvokeService (IMessage aMessage, IServerChannelInfo aChannel) [0x00000] in :0
This work fine on Windows/OSX. However, if call the server from JSONRPC it work fine!
I know my deployment is uncommon, so I want to know what exactly mean that exception and where start to look for clues.
antonk
(antonk)
May 3, 2012, 11:35am
2
Hello
At first, your deployment is not so uncommon - Mono allows to run Data Abstract for .NET servers on nearly any Linux platform.
This exception means that:
Request from the client was successfully retrieved over the wire and deserialized w/o errors (ie message format was recognized)
RemObjects SDK framework successfully instantiated (or took from the pool, depends on used Class Factory being used) class implementing the service being called
RemObjects SDK was unable to find the internally generated method that is needed to invoke the requested method (take a look at _Invk file(s) in your server project - that’s where invoker methods reside).
In most cases this error means that client calls an service method unknown by the server.
Note that you cannot just add a method to the service class and be able to call it from a remote client. Yon need to edit service RODL as well to be able to regenerate _Intf and _Invk files.
mamcx
(mamcx)
May 3, 2012, 5:12pm
3
Ok, but the method is already published, and work fine called on WIn/OSX. You can check it on:
http://bestsellercloud.heroku.com/
P.D> Call to the regular DA methods work fine (like loginEx, GetData, etc) Only my custom methods have this error (all of them).
Could be related to http://connect.remobjects.com/discussion/1553/in-monoosx-the-custom-services-are-not-published ?
mamcx
(mamcx)
May 3, 2012, 7:43pm
4
I found that the RODL files are generated differently
RODL Heroku.xml
<?xml version="1.0" encoding="utf-8"?>
<Library Name="DataAbstract4" Namespace="RemObjects.DataAbstract.Server" UID="{DC8B7BE2-14AF-402D-B1F8-E1008B6FA4F6}" Version="3.0">
<Services>
<Service Name="DataAbstractService" UID="{709489E3-3AFE-4449-84C3-305C2862B348}" Abstract="1">
<Interfaces>
<Interface Name="Default" UID="{4C2EC238-4FB4-434E-8CFF-ED25EEFF1525}">
<Documentation><![CDATA[ Service WinFormsDAServerService. This service has been automatically generated using the RODL template you can find in the Templates directory.]]></Documentation>
<Operations>
<Operation Name="GetSchema" UID="{684994AA-6829-4497-A054-0ACB6647E24F}">
<Parameters>
This file has been truncated. show original
RODL Win.xml
<?xml version="1.0"?>
<Library Name="BestSeller" UID="{70b9755f-2995-4813-8496-6e80901ef225}" Version="3.2">
<Structs>
<Struct Name="DataParameter" UID="{960c67f1-f39a-43ef-9d45-e091ace04a86}" Ancestor="" AutoCreateParams="1">
<Elements>
<Element Name="Name" UID="{36be78ab-cfc5-4546-92e0-9fe4ea3d8267}" DataType="Utf8String" />
<Element Name="Value" UID="{40859ec1-da7c-4ed4-964a-c59f07261c25}" DataType="Variant" />
</Elements>
</Struct>
<Struct Name="TableRequestInfo" UID="{ad4d327e-650e-42af-8d57-1166124fb515}" Ancestor="" AutoCreateParams="1">
This file has been truncated. show original
rodl.diff
diff --git a/Test/BestSeller-rodl.xml b/Test/BestSeller-rodl.xml
--- a/Test/BestSeller-rodl.xml
+++ b/Test/BestSeller-rodl.xml
@@ -1,490 +1,360 @@
-<?xml version="1.0"?>
-<Library Name="BestSeller" UID="{70b9755f-2995-4813-8496-6e80901ef225}" Version="3.2">
- <Structs>
- <Struct Name="DataParameter" UID="{960c67f1-f39a-43ef-9d45-e091ace04a86}" Ancestor="" AutoCreateParams="1">
- <Elements>
- <Element Name="Name" UID="{36be78ab-cfc5-4546-92e0-9fe4ea3d8267}" DataType="Utf8String" />
This file has been truncated. show original
The RODL for the same code/version of the project differ when is generated on heroku and on windows.
antonk
(antonk)
May 4, 2012, 10:29am
5
As for the issue http://connect.remobjects.com/discussion/1553/in-monoosx-the-custom-services-are-not-published - no.
RODL file could be not present at all in the server app - this doesn’t affect server functionality. RODL file is stored as a resource and isn’t anyhow used in service methods invokation
Ok, but the method is already published, and work fine called on WIn/OSX.
You tried to run *the same* binary file on Linux or recompiled it?
mamcx
(mamcx)
May 4, 2012, 5:40pm
6
Recompiled it. That is how work heroku:
http://blog.benhall.me.uk/2012/01/how-to-deploy-mono-projects-to-heroku.html
I try also under amazon ec2 and a local ubuntu (server 11) VM. IN both (recompiling) doesn’t work neither.
mamcx
(mamcx)
May 5, 2012, 1:34am
7
I finally found what happened.
For testing, I use ZeroConf to get the server, but for deployment I use reachability to get the server.
I have this method:
(void) connectServer:(RORemoteService *)ro
{
ro.channel.delegate = self;
self.srvLogin = [LoginService_Proxy proxyWithService:ro];
self.srvData = [Data_AsyncProxy proxyWithService:ro];
self.srvAdmin = [Admin_AsyncProxy proxyWithService:ro];
isConnected = YES;
[self goOnline];
}
Then from ZeroConf:
[self connectServer:[RORemoteService remoteServiceWithNetService:self.server]];
And for Reachability:
[self connectServer:[RORemoteService remoteServiceWithTargetURL:[NSURL URLWithString:url] serviceName:@"LoginService"]];
But look like because serviceName is set, self.srvData do not have the methods for that service.
However, If I build a RORemoteService for each service work fine.