sample binding-notification-consumer fails with exception..

2007-09-11 Thread haleh mahbod
Hi,
Trying to run this sample I get the following exception. Any idea if this is
a bug or I am doing something wrong?
I am running with .99 binary dist.

C:\tuscany-new\sca-dist\tuscany-
sca-0.99-incubating\samples\binding-notification
-consumerjava -Dnotification.httpPort=8082 -cp
target\sample-binding-notificat
ion-consumer-0.99-incubating.jar
;%NOTIFICATION_IMPL_JAR%;%NOTIFICATION_BINDING_J
AR%;%STAX_JAR%;%TUSCANY_SCA_MANIFEST_JAR%
notification.consumer.TrafficAdvisory
Server
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.init(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Sour
ce)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source)
at
org.apache.tuscany.sca.binding.notification.util.IOUtils.sendHttpRequ
est(IOUtils.java:80)
at
org.apache.tuscany.sca.binding.notification.util.IOUtils.sendHttpRequ
est(IOUtils.java:51)
at
org.apache.tuscany.sca.binding.notification.NotificationTypeManagerIm
pl.newConsumer(NotificationTypeManagerImpl.java:112)
at
org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
gProvider.deployConsumer(NotificationServiceBindingProvider.java:159)
at
org.apache.tuscany.sca.binding.notification.NotificationBindingProvid
erFactory.serviceProviderStarted(NotificationBindingProviderFactory.java
:159)
at
org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
gProvider.start(NotificationServiceBindingProvider.java:149)
at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start
(Com
positeActivatorImpl.java:414)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
.init(Def
aultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
(SCAD
omain.java:230)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance
(SCADomain.
java:69)
at notification.consumer.TrafficAdvisoryServer.main
(TrafficAdvisoryServe
r.java:32)
org.osoa.sca.ServiceRuntimeException: java.lang.RuntimeException:
java.net.Conne
ctException: Connection refused: connect
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
(SCAD
omain.java:264)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance
(SCADomain.
java:69)
at notification.consumer.TrafficAdvisoryServer.main
(TrafficAdvisoryServe
r.java:32)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection
ref
used: connect
at
org.apache.tuscany.sca.binding.notification.NotificationTypeManagerIm
pl.newConsumer(NotificationTypeManagerImpl.java:123)
at
org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
gProvider.deployConsumer(NotificationServiceBindingProvider.java:159)
at
org.apache.tuscany.sca.binding.notification.NotificationBindingProvid
erFactory.serviceProviderStarted(NotificationBindingProviderFactory.java
:159)
at
org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
gProvider.start(NotificationServiceBindingProvider.java:149)
at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start
(Com
positeActivatorImpl.java:414)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
.init(Def
aultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
(SCAD
omain.java:230)
... 2 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.init(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at 

Re: sample binding-notification-consumer fails with exception..

2007-09-11 Thread Ignacio Silva-Lepe
The three binding notification samples can be run in
isolation (although they won't do much of interest) as
long as the notification.httpPort system property is
the same as the port used in the ntm attribute of the
binding.notification element.
As they are packaged, the ntm attribute is set to
use port 8083, so either change the system property
(notification.httpPort) to match, or run the producer
sample first. You can also look at the README for
more details.


On 9/11/07, haleh mahbod [EMAIL PROTECTED] wrote:

 Hi,
 Trying to run this sample I get the following exception. Any idea if this
 is
 a bug or I am doing something wrong?
 I am running with .99 binary dist.

 C:\tuscany-new\sca-dist\tuscany-
 sca-0.99-incubating\samples\binding-notification
 -consumerjava -Dnotification.httpPort=8082 -cp
 target\sample-binding-notificat
 ion-consumer-0.99-incubating.jar
 ;%NOTIFICATION_IMPL_JAR%;%NOTIFICATION_BINDING_J
 AR%;%STAX_JAR%;%TUSCANY_SCA_MANIFEST_JAR%
 notification.consumer.TrafficAdvisory
 Server
 java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.init(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
 (Unknown
 Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
 Sour
 ce)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
 Source)
at
 org.apache.tuscany.sca.binding.notification.util.IOUtils.sendHttpRequ
 est(IOUtils.java:80)
at
 org.apache.tuscany.sca.binding.notification.util.IOUtils.sendHttpRequ
 est(IOUtils.java:51)
at
 org.apache.tuscany.sca.binding.notification.NotificationTypeManagerIm
 pl.newConsumer(NotificationTypeManagerImpl.java:112)
at
 org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
 gProvider.deployConsumer(NotificationServiceBindingProvider.java:159)
at
 org.apache.tuscany.sca.binding.notification.NotificationBindingProvid
 erFactory.serviceProviderStarted(NotificationBindingProviderFactory.java
 :159)
at
 org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
 gProvider.start(NotificationServiceBindingProvider.java:149)
at
 org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start
 (Com
 positeActivatorImpl.java:414)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
 .init(Def
 aultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
 (SCAD
 omain.java:230)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance
 (SCADomain.
 java:69)
at notification.consumer.TrafficAdvisoryServer.main
 (TrafficAdvisoryServe
 r.java:32)
 org.osoa.sca.ServiceRuntimeException: java.lang.RuntimeException:
 java.net.Conne
 ctException: Connection refused: connect
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
 (SCAD
 omain.java:264)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance
 (SCADomain.
 java:69)
at notification.consumer.TrafficAdvisoryServer.main
 (TrafficAdvisoryServe
 r.java:32)
 Caused by: java.lang.RuntimeException: java.net.ConnectException:
 Connection
 ref
 used: connect
at
 org.apache.tuscany.sca.binding.notification.NotificationTypeManagerIm
 pl.newConsumer(NotificationTypeManagerImpl.java:123)
at
 org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
 gProvider.deployConsumer(NotificationServiceBindingProvider.java:159)
at
 org.apache.tuscany.sca.binding.notification.NotificationBindingProvid
 erFactory.serviceProviderStarted(NotificationBindingProviderFactory.java
 :159)
at
 org.apache.tuscany.sca.binding.notification.NotificationServiceBindin
 gProvider.start(NotificationServiceBindingProvider.java:149)
at
 org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start
 (Com
 positeActivatorImpl.java:414)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain
 .init(Def
 aultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance
 (SCAD
 omain.java:230)
... 2 more
 Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at