You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Scott Kurz <sk...@gmail.com> on 2011/08/19 23:33:29 UTC
Re: tuscany could't support generic interface
Hi fzhong,
I see what you're saying... we do have some code to support generics, but
this seems to be a hole in our support.
It seems the function in JavaInterfaceUtil could maybe be improved to match
the operation correctly (and possibly some other piece of java interface
introspection might also need to be fixed).
Can you please open a JIRA, and attach your testcase?
Scott
On Fri, Aug 19, 2011 at 4:21 AM, fzhong <fz...@travelsky.com> wrote:
> **
> Hi all,
> I was trying to build a rmi service using tuscany.I implemented a
> UserService interface that extends a generic interface,please see more
> details from my mail attachment;
>
> When I called normal method ,it worked well.But when I called generic
> method,it throwed exception.
> Here's the exception stacktrace,
>
>
> java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
> at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)
>
> at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:144)
>
> at org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:103)
>
> at org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:98)
>
> at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.invoke(RuntimeWireImpl.java:175)
>
> at org.apache.tuscany.sca.binding.rmi.provider.RMIServiceBindingProvider.invokeTarget(RMIServiceBindingProvider.java:148)
>
> at org.apache.tuscany.sca.binding.rmi.provider.RMIServiceBindingProvider$1.intercept(RMIServiceBindingProvider.java:110)
>
> at $java.rmi.server.UnicastRemoteObject$$EnhancerByCGLIB$$17915681.insert(<generated>)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
> at sun.rmi.transport.Transport$1.run(Transport.java:153)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
> at java.lang.Thread.run(Thread.java:595)
>
> at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
>
> at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
>
> at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
>
> at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
>
> …… …… ……
>
>
> Thanks !
> 2011-08-19
> ------------------------------
> fzhong
>
Re: Re: tuscany could't support generic interface
Posted by fzhong <fz...@travelsky.com>.
Hi Scott,
Thanks for your help.I opened a JIRA at https://issues.apache.org/jira/browse/TUSCANY-3926 ;
Thanks
2011-08-22
fzhong
发件人: Scott Kurz
发送时间: 2011-08-20 05:29:15
收件人: user
抄送:
主题: Re: tuscany could't support generic interface
Hi fzhong,
I see what you're saying... we do have some code to support generics, but this seems to be a hole in our support.
It seems the function in JavaInterfaceUtil could maybe be improved to match the operation correctly (and possibly some other piece of java interface introspection might also need to be fixed).
Can you please open a JIRA, and attach your testcase?
Scott
On Fri, Aug 19, 2011 at 4:21 AM, fzhong <fz...@travelsky.com> wrote:
Hi all,
I was trying to build a rmi service using tuscany.I implemented a UserService interface that extends a generic interface,please see more details from my mail attachment;
When I called normal method ,it worked well.But when I called generic method,it throwed exception.
Here's the exception stacktrace,
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)
at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:144)
at org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:103)
at org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:98)
at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.invoke(RuntimeWireImpl.java:175)
at org.apache.tuscany.sca.binding.rmi.provider.RMIServiceBindingProvider.invokeTarget(RMIServiceBindingProvider.java:148)
at org.apache.tuscany.sca.binding.rmi.provider.RMIServiceBindingProvider$1.intercept(RMIServiceBindingProvider.java:110)
at $java.rmi.server.UnicastRemoteObject$$EnhancerByCGLIB$$17915681.insert(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
…… …… ……
Thanks !
2011-08-19
fzhong