The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

patb23 (8) [Avatar] Offline
#1
I am getting the following error while running the client launcher. Tours and Trips started without any problem.

I am trying distributed example. Running tours and trips in 8081 and 8082.
I am using tuscany-sca-1.5.1

[java] Exception in thread "main" org.osoa.sca.ServiceUnavailableException: Unable to create SCA binding invoker for local target TestClient reference bookings (bindingURI=/TripBooking operation=newBooking)

Could anyone help?
simon.laws (19) [Avatar] Offline
#2
Re: Error running Chapter 3 example - ClientNode
Did you get past this problem?

Simon
patb23 (8) [Avatar] Offline
#3
Re: Error running Chapter 3 example - ClientNode
Nope. I am still getting that error.
Thanks

My earlier reply did not appear and hence posting again.
simon.laws (19) [Avatar] Offline
#4
Re: Error running Chapter 3 example - ClientNode
It's difficult to tell from what's reported. It would be good to try with the latest software. Then I can help you debug from a known baseline

Get the Tuscany 1.6 release from here (http://tuscany.apache.org/sca-java-1x-releases.html)

Get the first release candidate for the sample release from here (http://people.apache.org/~slaws/tuscany/travelsample-1.0-RC0/). If you're set up to get it out of svn directly you can do that too.

Simon
patb23 (8) [Avatar] Offline
#5
Re: Error running Chapter 3 example - ClientNode
Thanks for the links. I am still getting the same error. Sorry! I do not know how to debug/fix.

This is what I did.
1. I downloaded the Tuscany 1.6 from the link provided and also downloaded the book samples from the link.
2. Did install contributions, composites and cloud as mentioned in section 3.3.2 to 3.3.4. No errors so far.
3. Started Execution Nodes as described in 3.3.5 and do not see any error in the console.

4. When I ran the client from launcher directory, I am getting the following error:

run:
[java] Feb 11, 2010 3:29:23 PM org.apache.tuscany.sca.node.impl.NodeImpl <init>
[java] INFO: Creating node: http://localhost:9990/node-config/ClientNode
[java] Feb 11, 2010 3:29:24 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading contribution: file:/c:/Pattabi/tuscany-sca-1.6/tuscany-scatours-1.0-SNAPSHOT-src/contributions
/introducing-tours/target/scatours-contribution-introducing-tours.jar
[java] Feb 11, 2010 3:29:24 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading contribution: file:/c:/Pattabi/tuscany-sca-1.6/tuscany-scatours-1.0-SNAPSHOT-src/contributions
/introducing-client/target/scatours-contribution-introducing-client.jar
[java] Feb 11, 2010 3:29:24 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading composite: http://localhost:9990/composite-resolved/composite:introducing-client;http://client
.scatours/;Client
[java] Feb 11, 2010 3:29:25 PM org.apache.tuscany.sca.node.impl.NodeImpl start
[java] INFO: Starting node: http://localhost:9990/node-config/ClientNode
[java] Exception in thread "main" org.osoa.sca.ServiceUnavailableException: Unable to create SCA binding invoker fo
r local target TestClient reference bookings (bindingURI=/TripBooking operation=newBooking)
[java] at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCARe
ferenceBindingProvider.java:215)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.j
ava:323)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:202)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:11smilie
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.j
ava:29smilie
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:18smilie
[java] at $Proxy8.newBooking(Unknown Source)
[java] at scatours.client.impl.TestClientImpl.run(TestClientImpl.java:42)
[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(JavaImplementa
tionInvoker.java:156)
[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:349)
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193)
[java] at $Proxy6.run(Unknown Source)
[java] at scatours.IntroducingClientLauncher.main(IntroducingClientLauncher.java:34)
[java] Java Result: 1
patb23 (8) [Avatar] Offline
#6
Re: Error running Chapter 3 example - ClientNode
I am able to run the samples that came with Tuscany but getting error when adding a new contribution to the domain manager.smilie
Thanks

null
fabions (3) [Avatar] Offline
#7
Re: Error running Chapter 3 example - ClientNode
Hi,

I have the same problem. I can see that the Domain Manager is running, and that the other 2 nodes (responsible for introducing-trips and introducing-tours) are running too. I think that the problem can be related to the bindingURI (bindingURI=/TripBooking operation=newBooking), but I`m not sure. Does anyone have any idea?

Thanks,

Fabio
simon.laws (19) [Avatar] Offline
#8
Re: Error running Chapter 3 example - ClientNode
Let me give this a go and I'll report back
fabions (3) [Avatar] Offline
#9
Re: Error running Chapter 3 example - ClientNode
Hi,

Yesterday I saw that example again. Now I think I have a better idea about the "real" problem. When I deployed a composite using "http://localhost:9990/ui/composite/", I got an error message (post - Error getting data from the server). However, I just ignored it, clicked in contributions and then in composite again, and everything "seemed" to be right. Then, I proceeded, configured the nodes and tried again... Well, I got same error...

I checked the Atom feed to see the domain manager's version of the deployed compositions. The problem is that in those files I can`t see the "fully resolved absolute binding URIs". I guess that this is the problem. Please, take a look at the example bellow:

<composite targetNamespace="http://tuscanyscatours.com/" name="Tours">

<component name="TripBooking" uri="TripBooking">
<implementation.java class="com.tuscanyscatours.impl.TripBookingImpl"/>

<service name="Bookings">
<interface.java interface="com.tuscanyscatours.Bookings"/>
<binding.sca name="Bookings" uri="/TripBooking"/>
<callback/>
</service>

<reference name="mytrips">
<interface.java interface="com.goodvaluetrips.Trips"/>
<binding.sca name="mytrips--TripProvider..Trips" uri="/TripProvider"/>
<callback/>
</reference>

<reference name="cart">
<interface.java interface="com.tuscanyscatours.Updates"/>
<binding.sca name="cart--ShoppingCart..Updates" uri="/ShoppingCart/Updates"/>
<callback/>
</reference>
</component>

<component name="ShoppingCart" uri="ShoppingCart">
<implementation.java class="com.tuscanyscatours.impl.ShoppingCartImpl"/>

<service name="Checkout">
<interface.java interface="com.tuscanyscatours.Checkout"/>
<binding.sca name="Checkout" uri="/ShoppingCart/Checkout"/>
<callback/>
</service>

<service name="Updates">
<interface.java interface="com.tuscanyscatours.Updates"/>
<binding.sca name="Updates" uri="/ShoppingCart/Updates"/>
<callback/>
</service>
<property name="currency" mustSupply="false" many="false" type="ns2:string"/>
</component>
</composite>

Thanks,

Fábio
oskar.stolc (4) [Avatar] Offline
#10
Re: Error running Chapter 3 example - ClientNode
Hi,

I am also experiencing both problems described in this thread:
1.) I am getting 'post - Error getting data from the server' while trying to deploy the composites via the 'Composites' tab of the domain manager GUI
2.) I am getting '[java] Exception in thread "main" org.osoa.sca.ServiceUnavailableException: Unable to create SCA binding invoker for local target TestClient reference bookings (bindingURI=/TripBooking operation=newBooking)' while trying to run the client node

here is how to reproduce the errors:

##### terminal 1 #####

$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_19
$ ant -version
Apache Ant version 1.8.0 compiled on February 1 2010

$ rm -rf /tmp/tuscany
$ mkdir /tmp/tuscany
$ cd /tmp/tuscany

$ wget http://apache.phphosts.org/tuscany/java/sca/1.6/apache-tuscany-sca-1.6.tar.gz
$ md5sum apache-tuscany-sca-1.6.tar.gz
d73c2a5e68d08118537cec964d560453 apache-tuscany-sca-1.6.tar.gz
$ tar xzvf apache-tuscany-sca-1.6.tar.gz
$ export TUSCANY_HOME=/tmp/tuscany/tuscany-sca-1.6

$ wget http://people.apache.org/~slaws/tuscany/travelsample-1.0-RC0/apache-tuscany-scatours-1.0-SNAPSHOT-src.tar.gz
$ md5sum apache-tuscany-scatours-1.0-SNAPSHOT-src.tar.gz
264831bed425746bbafeda0e912202f7 apache-tuscany-scatours-1.0-SNAPSHOT-src.tar.gz
$ tar xzvf apache-tuscany-scatours-1.0-SNAPSHOT-src.tar.gz

$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/contributions/introducing-tours/
$ mvn
$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/contributions/introducing-trips/
$ mvn
$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/contributions/introducing-client/
$ mvn

$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/testdomain/
$ java -cp $TUSCANY_HOME/lib/tuscany-sca-manifest.jar org.apache.tuscany.sca.node.launcher.DomainManagerLauncher

##### firefor #####

http://localhost:9990/ui/workspace/
-> Contribution -> Add

- Contribution URI: introducing-tours
- Location: ../contributions/introducing-tours/target/scatours-contribution-introducing-tours.jar

- Contribution URI: introducing-trips
- Location: ../contributions/introducing-trips/target/scatours-contribution-introducing-trips.jar

- Contribution URI: introducing-client
- Location: ../contributions/introducing-client/target/scatours-contribution-introducing-client.jar

-> Composites -> Add

- Composite namespace: http://tuscanyscatours.com/
- Composite name: Tours
- Contribution URI: introducing-tours

- getting the "post - Error getting data from the server" error, page refresh is needed

- Composite namespace: http://goodvaluetrips.com/
- Composite name: Trips
- Contribution URI: introducing-trips

- getting the "post - Error getting data from the server" error, page refresh is needed

- Composite namespace: http://client.scatours/
- Composite name: Client
- Contribution URI: introducing-client

- getting the "post - Error getting data from the server" error, page refresh is needed

-> Cloud -> Add

- Node name: ToursNode
- Node URI: http://localhost:8081
- Composite namespace: http://tuscanyscatours.com/
- Composite name: Tours
- Contribution URI: introducing-tours

- Node name: TripsNode
- Node URI: http://localhost:8082
- Composite namespace: http://goodvaluetrips.com/
- Composite name: Trips
- Contribution URI: introducing-trips

- Node name: ClientNode
- Node URI: http://localhost:8083
- Composite namespace: http://client.scatours/
- Composite name: Client
- Contribution URI: introducing-client

##### terminal 2 #####

$ export TUSCANY_HOME=/tmp/tuscany/tuscany-sca-1.6
$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/launchers/introducing-tours/
$ ant run

##### terminal 3 #####

$ export TUSCANY_HOME=/tmp/tuscany/tuscany-sca-1.6
$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/launchers/introducing-trips/
$ ant run

##### terminal 4 #####

$ export TUSCANY_HOME=/tmp/tuscany/tuscany-sca-1.6
$ cd /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/launchers/introducing-client/
$ mvn
$ ant run
Buildfile: /tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/launchers/introducing-client/build.xml

run:
[java] Apr 11, 2010 1:50:22 PM org.apache.tuscany.sca.node.impl.NodeImpl <init>
[java] INFO: Creating node: http://localhost:9990/node-config/ClientNode
[java] Apr 11, 2010 1:50:23 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading contribution: file:/tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/testdomain/../contributions/introducing-tours/target/scatours-contribution-introducing-tours.jar
[java] Apr 11, 2010 1:50:24 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading contribution: file:/tmp/tuscany/tuscany-scatours-1.0-SNAPSHOT-src/testdomain/../contributions/introducing-client/target/scatours-contribution-introducing-client.jar
[java] Apr 11, 2010 1:50:24 PM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading composite: http://localhost:9990/composite-resolved/composite:introducing-client;http://client.scatours/;Client
[java] Apr 11, 2010 1:50:24 PM org.apache.tuscany.sca.node.impl.NodeImpl start
[java] INFO: Starting node: http://localhost:9990/node-config/ClientNode
[java] Exception in thread "main" org.osoa.sca.ServiceUnavailableException: Unable to create SCA binding invoker for local target TestClient reference bookings (bindingURI=/TripBooking operation=newBooking)
[java] at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:215)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:323)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:202)
[java] at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:11smilie
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:29smilie
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:18smilie
[java] at $Proxy8.newBooking(Unknown Source)
[java] at scatours.client.impl.TestClientImpl.run(TestClientImpl.java:42)
[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:156)
[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:349)
[java] at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193)
[java] at $Proxy6.run(Unknown Source)
[java] at scatours.IntroducingClientLauncher.main(IntroducingClientLauncher.java:34)
[java] Java Result: 1


Are there any additional steps needed to make this sample work?

Thanks,
Oskar
kalarkar (4) [Avatar] Offline
#11
Re: Error running Chapter 3 example - ClientNode
Just to add that I am facing the exact same problem. I also did see the pop up saying: POST - Error getting data from the server.

I am using tuscany 1.6 with the latest code.
simon.laws (19) [Avatar] Offline
#12
Re: Error running Chapter 3 example - ClientNode
Can you give it a spin but get the latest sample downloads from the distribution artifacts link pointed to by this mail (http://www.mail-archive.com/dev%40tuscany.apache.org/msg12679.html). It still depends on Tuscany SCA 1.6.

Thanks

Simon
simon.nash (37) [Avatar] Offline
#13
Re: Error running Chapter 3 example - ClientNode
I have reproduced these problems using the travel sample release candidate and Tuscany SCA 1.6.

The "post - Error getting data" problem is caused by an HTTP 500 error response code from a POST request made from the browser GUI using Tuscany's Atom binding. I'm investigating what is causing this error code to be returned. The workaround of doing a browser refresh seems OK and shouldn't cause any other problems.

The "Unable to create SCA binding invoker" problem is caused by a bug in the Tuscany SCA 1.6 Domain Manager GUI. When creating a <nodename>.composite file in the "cloud" directory, it adds the following bindings:

<service name="Node">
<binding.ws uri="http://localhost:808x" />
<t:binding.http uri="http://localhost:808x" />
<t:binding.jsonrpc uri="http://localhost:808x" />
<t:binding.atom uri="http://localhost:808x" />
</service>

This list of bindings should also include <binding.sca>. The complete list should be:

<service name="Node">
<binding.sca uri="http://localhost:808x" />
<binding.ws uri="http://localhost:808x" />
<t:binding.http uri="http://localhost:808x" />
<t:binding.jsonrpc uri="http://localhost:808x" />
<t:binding.atom uri="http://localhost:808x" />
</service>

The workaround for this problem is to manually edit all of the <nodename>.composite files in the "cloud" directory to add the missing <binding.sca> line. This should be done after completing the Domain Manager GUI configuration and before starting the first node launcher.

I'll create a JIRA for the missing <binding.sca> problem, and I'll post back here when I have more information on the HTTP response 500 problem.
patb23 (8) [Avatar] Offline
#14
Re: Error running Chapter 3 example - ClientNode
Thank you so much. It worked after manually editing the cloud files.
Now I can happily continue reading the book.
Thanks
simon.nash (37) [Avatar] Offline
#15
Re: Error running Chapter 3 example - ClientNode
You're very welcome, and I'm sorry that you have been waiting since January for a solution. I tested this when writing chapter 3 and I'm not sure how I failed to notice these two problems.
simon.nash (37) [Avatar] Offline
#16
Re: Error running Chapter 3 example - ClientNode
I have found the cause of the "post - Error getting data" problem. This is caused by some null pointer exceptions in the domain manager code to handle the domain search functionality. I'll raise a JIRA for this.