You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ignacio Silva-Lepe (JIRA)" <tu...@ws.apache.org> on 2007/08/28 16:33:31 UTC

[jira] Commented: (TUSCANY-1620) Exception running the binding-notification-producer sample

    [ https://issues.apache.org/jira/browse/TUSCANY-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523249 ] 

Ignacio Silva-Lepe commented on TUSCANY-1620:
---------------------------------------------

I misspoke above about where the databinding interceptor is not being added. The trace above shows the invocation chain between the notification component and the composite reference. In particular, it shows the notification component invoker calling the notification reference binding invoker directly with no databinding interceptor in between. This is indeed correct, as both ends have the same databinding.
However, where a databinding interceptor _should_ be added is in the invocation chain between the traffic advisory producer and the notification component.
Doing a little bit of debugging, I have a break point in DataBindingRuntimeWireProcessor.process, and in line 116 I can see that the target contract (a WSDLInterfaceContractImpl) has a single OperationImpl in its list of operations, which is ok, but this operation has a dataBinding value of null. This means that isTransformationRequired eventually returns null and no databinding interceptor is added.
I am not sure what has changed in the last week or so to make this happen, as I am assuming that the OperationImpl's databinding value was not null before, since the sample was working.
Any ideas?


> Exception running the binding-notification-producer sample
> ----------------------------------------------------------
>
>                 Key: TUSCANY-1620
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1620
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA Samples
>    Affects Versions: Java-SCA-0.99, Java-SCA-1.0
>         Environment: WIndows XP
>            Reporter: Ignacio Silva-Lepe
>             Fix For: Java-SCA-0.99, Java-SCA-1.0
>
>
> I am getting the following exception trying to run the binding-notification-
> producer sample and trying to send a message to a binding-notification-
> consumer. The NotificaitonReferenceBindingInvoker is expecting an
> OMElement that should be coming from the notification component via
> the corresponding databinding. But I don't see a databinding interceptor
> between the RuntimeSCABindingInvoker and the NotificationReference-
> BindingInvoker, the way you see it in the databinding-echo trace of
> TUSCANY-1582.
> Any ideas as to why the databinding interceptor is not being added to the
> invocation chain?
>  
> java.lang.RuntimeException: payload not OMElement
>         at org.apache.tuscany.sca.binding.notification.NotificationReferenceBind
> ingInvoker.getWriteableFromPayload(NotificationReferenceBindingInvoker.java:115) 
>         at org.apache.tuscany.sca.binding.notification.NotificationReferenceBind
> ingInvoker.invoke(NotificationReferenceBindingInvoker.java:81)
>         at org.apache.tuscany.sca.implementation.notification.NotificationCompon 
> entInvoker.invoke(NotificationComponentInvoker.java:81)
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invo
> ke(RuntimeSCABindingInvoker.java:48)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke (JD
> KInvocationHandler.java:236)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
> KInvocationHandler.java:93)
>         at $Proxy8.trafficNotification(Unknown Source)
>         at notification.producer.TrafficAdvisoryProducer.produceTrafficNotificat
> ion(TrafficAdvisoryProducer.java:34)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementat 
> ionInvoker.invoke(JavaImplementationInvoker.java:91)
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invo
> ke(RuntimeSCABindingInvoker.java:48)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke (JD
> KInvocationHandler.java:236)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
> KInvocationHandler.java:93)
>         at $Proxy7.produceTrafficNotification(Unknown Source)
>         at notification.producer.TrafficAdvisoryServer.main(TrafficAdvisoryServe
> r.java:45)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-1620) Exception running the binding-notification-producer sample

Posted by Raymond Feng <en...@gmail.com>.
Hi, Ignacio.

I have made some progress here with the following changes.

1) In the implementation.notification provider, set the default databinding 
of the service implementation contract to OMElement.
2) Add wstx-asl-3.2.1 and tuscany-databinding-axiom as untime dependencies

Now I'm at the point that your help is needed. Can you explain the following 
code in 
org.apache.tuscany.sca.binding.notification.NotificationBindingProviderFactory? 
Please note now we defer the activation of references to the 1st time they 
are used for invocation. So the assumption of that all references/services 
are pre-activated are NOT true any more.

Thanks,
Raymond

/*
* These methods are intended to be called by the binding providers' start 
methods. By the time this
* happens, both referenceBindingProvider != null && serviceBindingProvider 
!= null, if they are
* ever going to be
*/
public void serviceProviderStarted(URI notificationType,
NotificationServiceBindingProvider serviceBindingProvider,
URL remoteNtmUrl) {
NotificationReferenceBindingProvider referenceBindingProvider = 
referenceBindingProviders.get(notificationType);
    if (referenceBindingProvider == null) {
        serviceBindingProvider.deployConsumer();
    }
    else if (referenceBindingProvider.isStarted()) {
        String brokerID = BrokerID.generate();
        deployBroker(notificationType, serviceBindingProvider, 
referenceBindingProvider, brokerID, remoteNtmUrl);
    }
}

public void referenceProviderStarted(URI notificationType,
NotificationReferenceBindingProvider referenceBindingProvider,
URL remoteNtmUrl) {
    NotificationServiceBindingProvider serviceBindingProvider = 
serviceBindingProviders.get(notificationType);
    if (serviceBindingProvider == null) {
        referenceBindingProvider.deployProducer();
    }
    else if (serviceBindingProvider.isStarted()) {
        String brokerID = BrokerID.generate();
        deployBroker(notificationType, serviceBindingProvider, 
referenceBindingProvider, brokerID, remoteNtmUrl);
    }
}

----- Original Message ----- 
From: "Ignacio Silva-Lepe (JIRA)" <tu...@ws.apache.org>
To: <tu...@ws.apache.org>
Sent: Tuesday, August 28, 2007 7:33 AM
Subject: [jira] Commented: (TUSCANY-1620) Exception running the 
binding-notification-producer sample


>
>    [ 
> https://issues.apache.org/jira/browse/TUSCANY-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523249 ]
>
> Ignacio Silva-Lepe commented on TUSCANY-1620:
> ---------------------------------------------
>
> I misspoke above about where the databinding interceptor is not being 
> added. The trace above shows the invocation chain between the notification 
> component and the composite reference. In particular, it shows the 
> notification component invoker calling the notification reference binding 
> invoker directly with no databinding interceptor in between. This is 
> indeed correct, as both ends have the same databinding.
> However, where a databinding interceptor _should_ be added is in the 
> invocation chain between the traffic advisory producer and the 
> notification component.
> Doing a little bit of debugging, I have a break point in 
> DataBindingRuntimeWireProcessor.process, and in line 116 I can see that 
> the target contract (a WSDLInterfaceContractImpl) has a single 
> OperationImpl in its list of operations, which is ok, but this operation 
> has a dataBinding value of null. This means that isTransformationRequired 
> eventually returns null and no databinding interceptor is added.
> I am not sure what has changed in the last week or so to make this happen, 
> as I am assuming that the OperationImpl's databinding value was not null 
> before, since the sample was working.
> Any ideas?
>
>
>> Exception running the binding-notification-producer sample
>> ----------------------------------------------------------
>>
>>                 Key: TUSCANY-1620
>>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1620
>>             Project: Tuscany
>>          Issue Type: Bug
>>          Components: Java SCA Data Binding Runtime, Java SCA Samples
>>    Affects Versions: Java-SCA-0.99, Java-SCA-1.0
>>         Environment: WIndows XP
>>            Reporter: Ignacio Silva-Lepe
>>             Fix For: Java-SCA-0.99, Java-SCA-1.0
>>
>>
>> I am getting the following exception trying to run the 
>> binding-notification-
>> producer sample and trying to send a message to a binding-notification-
>> consumer. The NotificaitonReferenceBindingInvoker is expecting an
>> OMElement that should be coming from the notification component via
>> the corresponding databinding. But I don't see a databinding interceptor
>> between the RuntimeSCABindingInvoker and the NotificationReference-
>> BindingInvoker, the way you see it in the databinding-echo trace of
>> TUSCANY-1582.
>> Any ideas as to why the databinding interceptor is not being added to the
>> invocation chain?
>>
>> java.lang.RuntimeException: payload not OMElement
>>         at 
>> org.apache.tuscany.sca.binding.notification.NotificationReferenceBind
>> ingInvoker.getWriteableFromPayload(NotificationReferenceBindingInvoker.java:115)
>>         at 
>> org.apache.tuscany.sca.binding.notification.NotificationReferenceBind
>> ingInvoker.invoke(NotificationReferenceBindingInvoker.java:81)
>>         at 
>> org.apache.tuscany.sca.implementation.notification.NotificationCompon
>> entInvoker.invoke(NotificationComponentInvoker.java:81)
>>         at 
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invo
>> ke(RuntimeSCABindingInvoker.java:48)
>>         at 
>> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke (JD
>> KInvocationHandler.java:236)
>>         at 
>> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
>> KInvocationHandler.java:93)
>>         at $Proxy8.trafficNotification(Unknown Source)
>>         at 
>> notification.producer.TrafficAdvisoryProducer.produceTrafficNotificat
>> ion(TrafficAdvisoryProducer.java:34)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke 
>> (NativeMethodAccessorImpl.
>> java:39)
>>         at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>         at 
>> org.apache.tuscany.sca.implementation.java.invocation.JavaImplementat
>> ionInvoker.invoke(JavaImplementationInvoker.java:91)
>>         at 
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invo
>> ke(RuntimeSCABindingInvoker.java:48)
>>         at 
>> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke (JD
>> KInvocationHandler.java:236)
>>         at 
>> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
>> KInvocationHandler.java:93)
>>         at $Proxy7.produceTrafficNotification(Unknown Source)
>>         at 
>> notification.producer.TrafficAdvisoryServer.main(TrafficAdvisoryServe
>> r.java:45)
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org