You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Nash <na...@hursley.ibm.com> on 2007/07/01 17:23:21 UTC
Re: Nested Callbacks Fail
Thanks for posting this test case. I tried running it against my
updated code that fixes the binding callback problems described in
TUSCANY-1341, and I did not see the failure. I'll post the complete
set of patches for my fix to TUSCANY-1341 later today.
Simon
He Yuan Huang wrote:
> Ant, I just created a JIRA and attached my application. If possible, I will
> try to figure out a patch:-)
> https://issues.apache.org/jira/browse/TUSCANY-1398
>
> Best Regards,
> York
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fri, 29 Jun 2007 22:09:08 -0700 ant elder wrote:
>
> On 6/30/07, He Yuan Huang <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
> I created a simple SCA application, which involves an order process. Below
> is the composite file of the application. Note that, the callback method
> of
> Supplier will invoke the callback interface of Customer. Thus, there are
> nested callbacks.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
> targetNamespace="http://orderprocess";
> xmlns:cb="http://orderprocess";
> name="orderprocess">
>
> <component name="Customer">
> <implementation.java class="orderprocess.CustomerImpl"/>
> <reference name="supplier" target="Supplier/Order">
> <interface.java interface="orderprocess.Order"
> callbackInterface="orderprocess.OrderNotification"/>
> </reference>
> </component>
>
> <component name="Supplier">
> <service name="Order">
> <interface.java interface="orderprocess.Order"
> callbackInterface="orderprocess.OrderNotification"/>
> </service>
> <implementation.java class="orderprocess.SupplierImpl"/>
> <reference name="railway" target="RailwayTransport/Shipment">
> <interface.java interface="orderprocess.Shipment"
> callbackInterface="orderprocess.ShipmentNotification"/>
> </reference>
> <reference name="highway" target="HighwayTransport">
> <interface.java interface="orderprocess.Shipment"
> callbackInterface="orderprocess.ShipmentNotification"/>
> </reference>
> </component>
>
> <component name="HighwayTransport">
> <service name="Shipment">
> <interface.java interface="orderprocess.Shipment"
> callbackInterface="orderprocess.ShipmentNotification"/>
> </service>
> <implementation.java class="orderprocess.HighwayTransport"/>
> <property name="period">5000</property>
> </component>
>
> <component name="RailwayTransport">
> <service name="Shipment">
> <interface.java interface="orderprocess.Shipment"
> callbackInterface="orderprocess.ShipmentNotification"/>
> </service>
> <implementation.java class="orderprocess.RaiwayTransport"/>
> <property name="period">1000</property>
> </component>
>
> </composite>
>
> However, the application fails on both SCA Java 0.90 and trunk. Below is
> the error message. When I debugged the application, I found that it might
> be caused by wrong "from" info in ThreadMessageContext.
>
> java.lang.NullPointerException
> at
> org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke
> (
> JDKCallbackInvocationHandler.java:77)
> at $Proxy11.notify(Unknown Source)
> at orderprocess.SupplierImpl.notify(SupplierImpl.java:70)
> 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
>
> org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invokeTarget
>
> (
> JavaTargetInvoker.java:112)
> at
>
> org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke
>
> (
> JavaTargetInvoker.java:134)
> at
>
> org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke
>
> (
> TargetInvokerInvoker.java:46)
> at
> org.apache.tuscany.sca.core.invocation.AbstractInvocationHandler.invoke(
> AbstractInvocationHandler.java:84)
> at
> org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke
> (
> JDKCallbackInvocationHandler.java:85)
> at $Proxy13.notify(Unknown Source)
> at orderprocess.RaiwayTransport.doShipping(RaiwayTransport.java:56)
> 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
>
> org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invokeTarget
>
> (
> JavaTargetInvoker.java:112)
> at
>
> org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke
>
> (
> JavaTargetInvoker.java:134)RuntimeException invoking receiveResult:
> java.lang.NullPointerException
>
> at
>
> org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke
>
> (
> TargetInvokerInvoker.java:46)
> at
> org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor$1.run(
> NonBlockingInterceptor.java:68)
> at org.apache.tuscany.sca.core.work.Jsr237Work.run(Jsr237Work.java
> :61
> )
> at
> org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run(
> ThreadPoolWorkManager.java:206)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
>
> Best Regards,
> York
>
>
>
> Is there any chance you could raise a JIRA (
> http://issues.apache.org/jira/browse/TUSCANY) and attach your application
> so
> we could recreate this problem?
>
> And even better if you're keen...also a patch to fix the bug :-)
>
> ...ant
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org