pyrolite - java error if remote object includes further libs in called method

"Handzsuj, Thomas" <[email protected]>
Newsgroups gmane.comp.python.pyro
Message-ID <B17AC98D7F7D3743B3885C200EDB60BA037E59211F@CDECLUEXMBX02.corp.draeger.global>
Hi,

I am very happy about Pyro4 and pyrolite but I have an issue in using pyrolite with Java.

The following simple example works fine:

import Pyro4
import numpy as np

class S3CsvReader(object):
    def __init__(self):
        self.x = np.array([1.0, 2.0])

    def get_data(self):
        return [1.0, 2.0, 3.0]

if __name__ == '__main__':
    Pyro4.config.HMAC_KEY = '0000'
    rdr = S3CsvReader()
    daemon = Pyro4.Daemon(port=51300)
    uri = daemon.register(rdr, "rdr")
    daemon.requestLoop()

... but if I change get_data to:

    def get_data(self):
        return list(self.x)

... an Java exception occurs:

Exception in thread "main" net.razorvine.pickle.PickleException: expected zero arguments for construction of ClassDict
        at net.razorvine.pickle.objects.ClassDictConstructor.construct(ClassDictConstructor.java:25)
        at net.razorvine.pickle.Unpickler.load_reduce(Unpickler.java:597)
        at net.razorvine.pickle.Unpickler.dispatch(Unpickler.java:164)
        at net.razorvine.pickle.Unpickler.load(Unpickler.java:83)
        at net.razorvine.pickle.Unpickler.loads(Unpickler.java:96)
        at net.razorvine.pyro.PyroProxy.call(PyroProxy.java:191)
        at net.razorvine.pyro.PyroProxy.call(PyroProxy.java:109)
        at de.draeger.run.model.test_pyro_lmm.TestPyroLmm.main(TestPyroLmm.java:24)

The Java code is like this:
            Config.HMAC_KEY = "0000".getBytes("UTF-8");
            PyroProxy remoteobject = new PyroProxy("localhost", 51300, "rdr");
            Object result = remoteobject.call("get_data");
            ArrayList<Double> message = (ArrayList<Double>) result;
            System.out.println("result message=" + message);
            remoteobject.close();

I have
Python 2.7.3
Java 7
Pyro 4.18
Windows 7 (64bit but using the 32bit versions of Python and Java)

I tried Pyro4 4.20 but I get a incompatibility with the protocol even if I set
Pyro4.config.SERIALIZER = 'pickle'

Thanks a lot,
Thomas
---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthaelt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfaenger dieser E-mail sein, senden Sie bitte diese an den Absender zurueck und loeschen Sie die E-mail aus Ihrem System.


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.