Passing an object to the server doesn't work correctly
------------------------------------------------------
Key: CXF-2420
URL: https://issues.apache.org/jira/browse/CXF-2420
Project: CXF
Issue Type: Bug
Environment: OS: Linux Debian Lenny
Java: Sun JDK 1.6.0 Update 13
OSGi: Equinox 3.5.0.v20090520
CXF/DOSGi: Single Bundle Distribution 1.0/1.1.SNAPSHOT
Reporter: Saul Goode
Fix For: dOSGi-1.1, dOSGi-1.0
I'v got a Service PassObject exposed by CXF/DOSGi running on the server. This
service contains a method passAnObject which receives an object of type
MathHelper. MathHelper is an interface known both to the server and client. The
method passAnObject calls the methods MathHelper.getName() and
MathHelper.isGreaterThanZero(int) on the received object. When the client calls
the method passAnObject and passes an object which implements MathHelper the
following happens: The call to getName works as expected and returns a String.
But the call to the other method raises an exception on the server (stack trace
appended). I have this problem with both 1.0 and the 1.1.SNAPSHOT.
Is it unsupported to pass objects to a remote service provider? Or is this some
kind of bug?
I didn't find an option to upload sth, so I uploaded the sample code to:
http://ul.to/4vlftz
The archive contains the server, client and interface bundles. The interface
bundle runs on both the server and client.
Server-side Exception output by OSGi with Single Bundle Distribution 1.0:
02.09.2009 17:29:10 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Application has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: isGreaterZero is not delegated.
at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:148)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:114)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:95)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:265)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.IllegalAccessError: isGreaterZero is not delegated.
at
org.apache.cxf.aegis.type.basic.InterfaceInvocationHandler.invoke(InterfaceInvocationHandler.java:57)
at $Proxy33.isGreaterZero(Unknown Source)
at passobject.impl.PassObjectImpl.passAnObject(PassObjectImpl.java:10)
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:597)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
... 23 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.