java service with get/set methods will fail with ""illegal object given!"
Oliver Brinzing
Oliver.Brinzing at gmx.de
Mon Jul 9 17:34:41 UTC 2018
Hi,
i have a java service which is called from basic macro as seen below.
it works with aoo415, but will fail with lo 5.4.7.2:
module org {
module test {
interface XMeta {
interface com::sun::star::lang::XServiceInfo;
boolean initialize([in] com::sun::star::lang::XComponent xComponent);
// getter() without parameter will fail
string getName(); // not working
// setter() returning void will fail
void setName([in] string sAutor); // not working
string getVersion(); // not working
boolean setVersion([in] string sVersion); // works
};
};
module org {
module test {
service Meta : XMeta;
};
};
calling from basic:
oHandler = CreateUnoService("org.test.Meta")
oHandler.initialize(ThisComponent)
' will fail with a RuntimeExecption: "illegal object given!"
' [jni_uno bridge error] UNO calling Java method queryInterface: java.lang.NoSuchMethodError: getName
' java stack trace: java.lang.NoSuchMethodError: getName
it seem's the get/set Methods are automatically mapped to properties?
any hints what could be wrong?
Regards
Oliver
More information about the LibreOffice
mailing list