karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto São Marcos (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3646) Service method and inheritance
Date Wed, 08 Apr 2015 11:31:12 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14485098#comment-14485098
] 

Alberto São Marcos commented on KARAF-3646:
-------------------------------------------

Found the problem, in fact inheritance is not supported by the current implementation of the
org.apache.karaf.cellar.dosgi.RemoteServiceCallHandler.
https://github.com/apache/karaf-cellar/blob/d16c37c73e5b1ff64d416fbcc5655e5285b566d8/dosgi/src/main/java/org/apache/karaf/cellar/dosgi/RemoteServiceCallHandler.java#L90

http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getMethod%28java.lang.String,%20java.lang.Class...%29
{quote}
The parameterTypes parameter is an array of Class objects that identify the method's formal
parameter types
{quote}

Ill submit a pull request to fix this ASAP.



> Service method and inheritance
> ------------------------------
>
>                 Key: KARAF-3646
>                 URL: https://issues.apache.org/jira/browse/KARAF-3646
>             Project: Karaf
>          Issue Type: Bug
>          Components: cellar-dosgi
>    Affects Versions: cellar-3.0.1, cellar-3.0.2
>         Environment: Ubuntu 14.04.1 LTS
>            Reporter: Alberto São Marcos
>            Assignee: Jean-Baptiste Onofré
>              Labels: osgi
>
> Apparently cellar DOSGi does not support Service methods with inheritance in its signature:
> On the client side (service consumer) the call to the remote service times out.
> On the server side (service implementation) the following exception is thrown:
> {quote}
> 2015-04-08 10:56:09,791 | ERROR | pool-8-thread-1  | RemoteServiceCallHandler       
 | 75 - org.apache.karaf.cellar.dosgi - 3.0.2 | CELLAR DOSGI: unable to find remote method
for service
> java.lang.NoSuchMethodException: Proxy2955ffcf_d585_47e6_b5eb_3b91dc4f8522.greet(org.apache.karaf.cellar.samples.dosgi.greeter.api.GreeterEvent,
org.apache.karaf.cellar.samples.dosgi.greeter.api.Greet)
>         at java.lang.Class.getMethod(Class.java:1786)[:1.8.0_40]
>         at org.apache.karaf.cellar.dosgi.RemoteServiceCallHandler.handle(RemoteServiceCallHandler.java:90)[75:org.apache.karaf.cellar.dosgi:3.0.2]
>         at org.apache.karaf.cellar.dosgi.RemoteServiceCallHandler.handle(RemoteServiceCallHandler.java:37)[75:org.apache.karaf.cellar.dosgi:3.0.2]
>         at Proxy286b40f1_fb6f_4df3_a13a_361f80171460.handle(Unknown Source)[:]
>         at Proxy294bbf78_d128_472c_8251_a39a8e924c21.handle(Unknown Source)[:]
>         at org.apache.karaf.cellar.core.event.EventDispatchTask.run(EventDispatchTask.java:57)[68:org.apache.karaf.cellar.core:3.0.2]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_40]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_40]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]
> {quote}
> You can use https://github.com/albertocsm/karaf-cellar-example to check the behaviour



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message