Return-Path: Delivered-To: apmail-tuscany-dev-archive@www.apache.org Received: (qmail 52086 invoked from network); 2 Jul 2008 13:00:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2008 13:00:50 -0000 Received: (qmail 3020 invoked by uid 500); 2 Jul 2008 13:00:51 -0000 Delivered-To: apmail-tuscany-dev-archive@tuscany.apache.org Received: (qmail 2711 invoked by uid 500); 2 Jul 2008 13:00:50 -0000 Mailing-List: contact dev-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list dev@tuscany.apache.org Received: (qmail 2702 invoked by uid 99); 2 Jul 2008 13:00:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 06:00:50 -0700 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simonslaws@googlemail.com designates 209.85.146.183 as permitted sender) Received: from [209.85.146.183] (HELO wa-out-1112.google.com) (209.85.146.183) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 12:59:56 +0000 Received: by wa-out-1112.google.com with SMTP id k17so245307waf.0 for ; Wed, 02 Jul 2008 06:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=WRUjmy7p6Lx6c0AciXo9CrnpS51MYu+Ff2D/REsqn9I=; b=h+fxGQq+7byHz4RzXwhN1qBPxKQyz/fJ4PX4OFx9Mh0R5pGyVOg7ZEdt51Yfz87F0Q fSGEV+KGvRca7iabHkbkMIYVlh9ZnLZhayE6U/yEZjzLiGHTt5kshaHi9xUoEgCBFg+a SXBFtkM33G9NVPRBToHPOCiUkhQlNCzr86yec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=LsrPvRV3M4PHuG4YwC0fB8OfZi+vTDy37xIh5RyYqSc3+YPNeXJiQOmIU6XPLtSW7o tYny5OoqxKTkDaZcUp/CRlFZLeLTNMJ2/VoqqOKDz3Tt/P5X8CEP8oofJrfmfw9Zph+S zNwAbCVyDDQcJgz7wn9AY6U7V9GiqlGOmUGqA= Received: by 10.114.53.1 with SMTP id b1mr6974576waa.53.1215003617167; Wed, 02 Jul 2008 06:00:17 -0700 (PDT) Received: by 10.114.124.10 with HTTP; Wed, 2 Jul 2008 06:00:17 -0700 (PDT) Message-ID: Date: Wed, 2 Jul 2008 14:00:17 +0100 From: "Simon Laws" To: dev@tuscany.apache.org Subject: Re: [Fwd: get a reference to a domain from a remote program] In-Reply-To: <486B788E.1070601@irisa.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1976_10312393.1215003617155" References: <4868FAB2.6040107@irisa.fr> <486B788E.1070601@irisa.fr> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1976_10312393.1215003617155 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Jul 2, 2008 at 1:46 PM, Hinde Bouziane wrote: > Hi Simon and Raymond, > > Thank you very much for your help. > > I'm trying to apply the solution Simon suggested as in our case we prefer > to keep component services definitions unchanged (anyway, thanks Raymond). > One idea to resolve the problem is to expose a service (as a web service) > by the domain manager from which it may be possible to have a global vision > of available services/created components (like a naming service). Otherwise, > in a distributed manner, the same principle can be applied to nodes rather > than components insides nodes. > If I find another possible way, I'll post it. > > However, I'm facing now a problem that seems to be not related to usage of > additional components. The problem is the following: > > I encounter an error when a component (belonging to a first node) tries to > access a service provided by another component (belonging to a second node): > This later is not found and I don't understand why. > > The scenario is the following: > I launch a node (Let us name it NodeA) in which there is a component > (ComponentA) with two references (refA1, refA2), each reference has to be > connected to a service provided by a component (ComponentB) defined inside > another node (NodeBC). In NodeBC, there are two components ComponentB and > ComponentC. > > > When I launch NodeBC, first, the domain displays the Warning : > > Jul 2, 2008 12:32:00 PM > org.apache.tuscany.sca.workspace.admin.impl.ContributionCollectionImpl get > INFO: get http://tuscany.apache.org/cloud > Jul 2, 2008 12:32:00 PM > org.apache.tuscany.sca.workspace.admin.impl.DeployableCompositeCollectionImpl$1 > problem > WARNING: Component reference target not found, it might be a remote > service: ComponentB > Jul 2, 2008 12:32:00 PM > org.apache.tuscany.sca.workspace.admin.impl.DeployableCompositeCollectionImpl$1 > problem > WARNING: Component reference target not found, it might be a remote > service: ComponentB > > The same warning appears when I launch NodeA, so of course when ComponentA > try to access a remote service, an exception is thrown: Target fault type > cannot be resolved: null > > In order to check if I'm wrong somewhere in my application. To try to > resolve the problem step by step, I produced a close scenario starting from > the calculator-distributed sample. I put AddServiceComponentB and > SubtractServiceComponentC inside a same node NodeBC. Here are changed .xml > files: > ------------------ > ...resources/nodeBC/Calculator.composite > targetNamespace="http://sample" > xmlns:sample="http://sample" > name="CalculatorBC"> > > > > > > > > > > > domain.composite > targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0" > xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1=" > http://www.osoa.org/xmlns/sca/1.0"> > > > > > workspace.composite > > > > > > > cloud.composite > > targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0" > xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1=" > http://www.osoa.org/xmlns/sca/1.0"> > xmlns:ns2="http://sample/cloud"/> > xmlns:ns2="http://sample/cloud"/> > > > -------------------------- > > I have no problem to launch NodeBC, the domain does not display any warning > but I have the same problems when I launch the application from NodeA: > > ant runNodeA > Buildfile: build.xml > > runNodeA: > [java] Jul 2, 2008 1:54:04 PM > org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles > [java] INFO: Runtime classpath: 93 JARs from > /local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/modules > [java] Jul 2, 2008 1:54:04 PM > org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles > [java] INFO: Runtime classpath: 148 JARs from > /local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/lib > [java] Jul 2, 2008 1:54:04 PM org.apache.tuscany.sca.node.impl.NodeImpl > > [java] INFO: Creating node: http://localhost:9990/node-image/NodeA > [java] Jul 2, 2008 1:54:05 PM org.apache.tuscany.sca.node.impl.NodeImpl > > [java] INFO: CompositeURL : > http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > [java] Jul 2, 2008 1:54:05 PM org.apache.tuscany.sca.node.impl.NodeImpl > configureNode > [java] INFO: Loading contribution: > file:/local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/samples/calculator-distributedTry2composites/./src/main/resources/nodeA/ > [java] Jul 2, 2008 1:54:06 PM org.apache.tuscany.sca.node.impl.NodeImpl > configureNode > [java] INFO: Loading composite: > http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA > [java] Jul 2, 2008 1:54:07 PM > org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem > [java] WARNING: Component reference target not found, it might be a > remote service: AddServiceComponentB > [java] Jul 2, 2008 1:54:07 PM > org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem > [java] WARNING: Component reference target not found, it might be a > remote service: SubtractServiceComponentC > [java] Jul 2, 2008 1:54:07 PM org.apache.tuscany.sca.node.impl.NodeImpl > start > [java] INFO: Starting node: http://localhost:9990/node-image/NodeA > [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 > processor > [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 > processor > [java] CalculatorService - add 3.0 and 2.0 > [java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException: > org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: > null > [java] at > node.LaunchCalculatorNodeA.main(LaunchCalculatorNodeA.java:64) > [java] Caused by: org.osoa.sca.ServiceRuntimeException: Target fault > type cannot be resolved: null > [java] at > org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:134) > [java] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286) > [java] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) > [java] at $Proxy6.add(Unknown Source) > [java] at > calculator.CalculatorServiceImpl.add(CalculatorServiceImpl.java:56) > [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > [java] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [java] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [java] at java.lang.reflect.Method.invoke(Method.java:597) > [java] at > org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109) > [java] at > org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) > [java] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286) > [java] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) > [java] at $Proxy5.add(Unknown Source) > [java] at > node.LaunchCalculatorNodeA.main(LaunchCalculatorNodeA.java:46) > [java] Caused by: org.apache.axis2.AxisFault: toto > [java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > [java] at > org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195) > [java] at > org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) > [java] at > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327) > [java] at > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) > [java] at > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) > [java] at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > [java] at > org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:118) > [java] at > org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:89) > [java] at > org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCABindingInvoker.invoke(Axis2SCABindingInvoker.java:104) > [java] at > org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:78) > [java] ... 14 more > [java] Caused by: java.net.UnknownHostException: toto > [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) > [java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > [java] at java.net.Socket.connect(Socket.java:519) > [java] at java.net.Socket.connect(Socket.java:469) > [java] at java.net.Socket.(Socket.java:366) > [java] at java.net.Socket.(Socket.java:240) > [java] at > org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79) > [java] at > org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121) > [java] at > org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706) > [java] at > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321) > [java] at > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386) > [java] at > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) > [java] at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) > [java] at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) > [java] at > org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520) > [java] at > org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191) > [java] ... 25 more > [java] Java Result: 1 > > > Can you please tell me if I'm wrong in the way I have to define > references-services connections when services belong to nodes including > several components? > > Thank you very much. > regards > Hinde. > > Simon Laws wrote: > >> >> >> On Mon, Jun 30, 2008 at 4:24 PM, Hinde Bouziane > hbouzian@irisa.fr>> wrote: >> >> >> >> >> ---------- Forwarded message ---------- >> From: Hinde Bouziane > >> To: dev@tuscany.apache.org >> Date: Wed, 25 Jun 2008 19:08:21 +0200 >> Subject: get a reference to a domain from a remote program >> Hi all, >> >> In the context of a distributed application, I would like to find >> an existing domain from a program to be able to use services >> provided by components created in already launched nodes. >> For more details: >> 1) I use the DomainManagerLauncher interface to launch a domain. >> 2) I use the node2-launcher module to launch nodes (in the same >> way as done in calculator-distributed). Let's suppose that one >> node contains a component A. >> - Until now, I had no problem to starts nodes. >> 3) Now, from a program (that as a role of a client) I try to use a >> service provided by component A. For that, I want to find a >> reference to the domain created in 1) to asks for the wanted service. >> >> I'm using the 1.2 distribution. I found the SCADomainFinder class >> that offers the getSCADomain operation in the node-api. It seems >> that this operation provides a way to find an existing domain, >> but seems also be not completely implemented (a todo comment ). >> Is it the case? or is the usage of this operation is not >> compatible with the usage of node2... modules? Otherwise, is >> there another way to find and get the reference to the domain? >> >> Thank you for your help. >> Regards, >> Hinde >> >> >> Hi Hinde >> >> The SCADomainFinder feature is being removed from our next release (1.3) >> as it's not compatible with the Node2 implementation. What you could do is >> create a composite containing a component that references component A, let's >> call is AReference. If you then start a Node2 Instance configured to load >> the composite containing AReference you can then use the SCAClient API on >> Node2 to get a reference to AReference and the domain will ensure that the >> AReference component is connected to the A component wherever that is >> running. A bit clunky but we haven't yet rebuilt the client API for the new >> domain implementation. Any thoughts about how we should do this are most >> welcome. >> >> Simon >> > > Hi Hinde There are two things going on here. 1. [java] Caused by: java.net.UnknownHostException: toto 2. We aren't handling the exception from 1 properly for some reason so you get this strange [java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: null 1. is the important one and it looks like it's creating the URL toto. Can you send the generated composite file that nodeA runs. With the domain node running point your browser at ( http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA ) Simon. ------=_Part_1976_10312393.1215003617155 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On Wed, Jul 2, 2008 at 1:46 PM, Hinde Bouziane <hbouzian@irisa.fr> wrote:
Hi Simon and Raymond,

Thank you very much for your help.

I'm trying to apply the solution Simon suggested as in our case we prefer to keep component services definitions unchanged (anyway, thanks Raymond).
One idea to resolve the problem is to expose a service (as a web service) by the domain manager from which it may be possible to have a global vision of available services/created components (like a naming service). Otherwise, in a distributed manner, the same principle can be applied to nodes rather than components insides nodes.
If I find another possible way, I'll post it.

However, I'm facing now a problem that seems to be not related to usage of additional components. The problem is the following:

I encounter an error when a component (belonging to a first node) tries to access a service provided by another component (belonging to a second node): This later is not found and I don't understand why.

The scenario is the following:
I launch a node (Let us name it NodeA) in which there is a component (ComponentA) with two references (refA1, refA2), each reference has to be connected to a service provided by a component (ComponentB) defined inside another node (NodeBC). In NodeBC, there are two components ComponentB and ComponentC.


When I launch NodeBC, first, the domain displays the Warning :

Jul 2, 2008 12:32:00 PM org.apache.tuscany.sca.workspace.admin.impl.ContributionCollectionImpl get
INFO: get http://tuscany.apache.org/cloud
Jul 2, 2008 12:32:00 PM org.apache.tuscany.sca.workspace.admin.impl.DeployableCompositeCollectionImpl$1 problem
WARNING: Component reference target not found, it might be a remote service: ComponentB
Jul 2, 2008 12:32:00 PM org.apache.tuscany.sca.workspace.admin.impl.DeployableCompositeCollectionImpl$1 problem
WARNING: Component reference target not found, it might be a remote service: ComponentB

The same warning appears when I launch NodeA, so of course when ComponentA try to access a remote service, an exception is thrown: Target fault type cannot be resolved: null

In order to check if I'm wrong somewhere in my application. To try to resolve the problem step by step, I produced a close scenario starting from the calculator-distributed sample. I put AddServiceComponentB and SubtractServiceComponentC inside a same node NodeBC. Here are changed .xml files:
------------------
...resources/nodeBC/Calculator.composite
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
         targetNamespace="http://sample"
         xmlns:sample="http://sample"
         name="CalculatorBC">

  <component name="AddServiceComponentB">
      <implementation.java class="calculator.AddServiceImpl" />
  </component>

  <component name="SubtractServiceComponentC">
      <implementation.java class="calculator.SubtractServiceImpl" />
  </component>
 </composite>

domain.composite
<composite name="domain.composite"
 targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
 xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1="http://www.osoa.org/xmlns/sca/1.0">
 <include name="ns2:CalculatorA" uri="nodeA" xmlns:ns2="http://sample"/>
 <include name="ns2:CalculatorBC" uri="nodeBC" xmlns:ns2="http://sample"/>
</composite>

workspace.composite

<workspace xmlns="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:ns1="http://tuscany.apache.org/xmlns/sca/1.0">
 <contribution location="file:./src/main/resources/nodeA"  uri="nodeA"/>
 <contribution location="file:./src/main/resources/nodeBC"  uri="nodeBC"/>  <contribution location="file:./src/main/resources/cloud" uri="http://tuscany.apache.org/cloud"/> </workspace>

cloud.composite

<composite name="cloud.composite"
 targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
 xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1="http://www.osoa.org/xmlns/sca/1.0">
 <include name="ns2:NodeA" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://sample/cloud"/>
 <include name="ns2:NodeBC" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://sample/cloud"/>
</composite>

--------------------------

I have no problem to launch NodeBC, the domain does not display any warning but I have the same problems when I launch the application from NodeA:

ant runNodeA
Buildfile: build.xml

runNodeA:
   [java] Jul 2, 2008 1:54:04 PM org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
   [java] INFO: Runtime classpath: 93 JARs from /local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/modules
   [java] Jul 2, 2008 1:54:04 PM org.apache.tuscany.sca.node.launcher.NodeLauncherUtil collectJARFiles
   [java] INFO: Runtime classpath: 148 JARs from /local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/lib
   [java] Jul 2, 2008 1:54:04 PM org.apache.tuscany.sca.node.impl.NodeImpl <init>
   [java] INFO: Creating node: http://localhost:9990/node-image/NodeA
   [java] Jul 2, 2008 1:54:05 PM org.apache.tuscany.sca.node.impl.NodeImpl <init>
   [java] INFO: CompositeURL : http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   [java] Jul 2, 2008 1:54:05 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
   [java] INFO: Loading contribution: file:/local/hbouzian/PostDoc/src/sca/tuscany-sca-1.2-incubating/samples/calculator-distributedTry2composites/./src/main/resources/nodeA/
   [java] Jul 2, 2008 1:54:06 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
   [java] INFO: Loading composite: http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA
   [java] Jul 2, 2008 1:54:07 PM org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
   [java] WARNING: Component reference target not found, it might be a remote service: AddServiceComponentB
   [java] Jul 2, 2008 1:54:07 PM org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
   [java] WARNING: Component reference target not found, it might be a remote service: SubtractServiceComponentC
   [java] Jul 2, 2008 1:54:07 PM org.apache.tuscany.sca.node.impl.NodeImpl start
   [java] INFO: Starting node: http://localhost:9990/node-image/NodeA
   [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
   [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
   [java] CalculatorService - add 3.0 and 2.0
   [java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: null
   [java]     at node.LaunchCalculatorNodeA.main(LaunchCalculatorNodeA.java:64)
   [java] Caused by: org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: null
   [java]     at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:134)
   [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
   [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
   [java]     at $Proxy6.add(Unknown Source)
   [java]     at calculator.CalculatorServiceImpl.add(CalculatorServiceImpl.java:56)
   [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [java]     at java.lang.reflect.Method.invoke(Method.java:597)
   [java]     at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
   [java]     at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
   [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
   [java]     at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
   [java]     at $Proxy5.add(Unknown Source)
   [java]     at node.LaunchCalculatorNodeA.main(LaunchCalculatorNodeA.java:46)
   [java] Caused by: org.apache.axis2.AxisFault: toto
   [java]     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
   [java]     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
   [java]     at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
   [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
   [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
   [java]     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
   [java]     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
   [java]     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
   [java]     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
   [java]     at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:118)
   [java]     at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:89)
   [java]     at org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCABindingInvoker.invoke(Axis2SCABindingInvoker.java:104)
   [java]     at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:78)
   [java]     ... 14 more
   [java] Caused by: java.net.UnknownHostException: toto
   [java]     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
   [java]     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   [java]     at java.net.Socket.connect(Socket.java:519)
   [java]     at java.net.Socket.connect(Socket.java:469)
   [java]     at java.net.Socket.<init>(Socket.java:366)
   [java]     at java.net.Socket.<init>(Socket.java:240)
   [java]     at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
   [java]     at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
   [java]     at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
   [java]     at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
   [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
   [java]     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
   [java]     ... 25 more
   [java] Java Result: 1


Can you please tell me if I'm wrong in the way I have to define references-services connections when services belong to nodes including several components?

Thank you very much.
regards
Hinde.

Simon Laws wrote:


On Mon, Jun 30, 2008 at 4:24 PM, Hinde Bouziane <hbouzian@irisa.fr <mailto:hbouzian@irisa.fr>> wrote:




   ---------- Forwarded message ----------
   From: Hinde Bouziane <hbouzian@irisa.fr <mailto:hbouzian@irisa.fr>>
   To: dev@tuscany.apache.org <mailto:dev@tuscany.apache.org>
   Date: Wed, 25 Jun 2008 19:08:21 +0200
   Subject: get a reference to a domain from a remote program
   Hi all,

   In the context of a distributed application, I would like to find
   an existing domain from a program to be able to use services
   provided by components created in already launched nodes.
   For more details:
   1) I use the DomainManagerLauncher interface to launch a domain.
   2) I use  the  node2-launcher module to launch nodes (in the same
   way as done in calculator-distributed). Let's suppose that one
   node contains a component A.
   - Until now, I had no problem to starts nodes.
   3) Now, from a program (that as a role of a client) I try to use a
   service provided by component A. For that, I want to find a
   reference to the domain created in 1) to asks for  the wanted service.

   I'm using the 1.2 distribution. I found the SCADomainFinder class
   that offers the getSCADomain operation in the node-api. It seems
   that this operation  provides a way to find an existing domain,
   but seems also be not completely implemented (a todo comment ).
    Is it the case? or is the usage of this operation is not
   compatible with the usage of node2... modules?  Otherwise, is
   there another way to find and get the reference to the domain?

   Thank you for your help.
   Regards,
   Hinde


Hi Hinde

The SCADomainFinder feature is being removed from our next release (1.3) as it's not compatible with the Node2 implementation. What you could do is create a composite containing a component that references component A, let's call is AReference. If you then start a Node2 Instance configured to load the composite containing AReference you can then use the SCAClient API on Node2 to get a reference to AReference and the domain will ensure that the AReference component is connected to the A component wherever that is running. A bit clunky but we haven't yet rebuilt the client API for the new domain implementation. Any thoughts about how we should do this are most welcome.

Simon


Hi Hinde

There are two things going on here.

1.  [java] Caused by: java.net.UnknownHostException: toto
2. We aren't handling the exception from 1 properly for some reason so you get this strange
[java] Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: null

1. is the important one and it looks like it's creating the URL toto. Can you send the generated composite file that nodeA runs. With the domain node running point your browser at (http://localhost:9990/composite-resolved/composite:nodeA;http://sample;CalculatorA)

Simon.
------=_Part_1976_10312393.1215003617155--