Intermittent build failure in node-impl

2007-11-18 Thread Simon Nash

When doing a top-level build of modules today from a fairly recent checkout
of trunk, I got two errors in the node-impl tests.  Rerunning the build of
this module from its own directory was successful.  Any ideas?  My stack
trace output is below.

  Simon

---
 T E S T S
---
Running org.apache.tuscany.sca.node.impl.DomainDrivenTestCase
Setting up domain
18-Nov-2007 15:48:18 org.apache.tuscany.sca.domain.impl.SCADomainImpl init
INFO: Domain management configured from file:/H:/tuscany55/sca/modules/domain-im
pl/target/tuscany-domain-impl-1.1-incubating-SNAPSHOT.jar
18-Nov-2007 15:48:23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
18-Nov-2007 15:48:24 org.apache.catalina.startup.ContextConfig defaultWebConfig
INFO: No default web.xml
18-Nov-2007 15:48:24 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-
18-Nov-2007 15:48:24 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-
18-Nov-2007 15:48:25 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM
apping
INFO: Added Servlet mapping: http://EUREKA:/domain/*
18-Nov-2007 15:48:25 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM
apping
INFO: Added Servlet mapping: http://EUREKA:/DomainManagerComponent/DomainMan
agerNodeEventService
18-Nov-2007 15:48:25 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM
apping
INFO: Added Servlet mapping: http://EUREKA:/DomainManagerComponent/DomainMan
agementService/*
18-Nov-2007 15:48:25 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM
apping
INFO: Added Servlet mapping: http://EUREKA:/DomainManagerComponent/DomainMan
agementService
18-Nov-2007 15:48:25 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM
apping
INFO: Added Servlet mapping: http://EUREKA:/SCADomain/scaDomain.js
Setting up calculator nodes
18-Nov-2007 15:48:25 org.apache.tuscany.sca.domain.impl.SCADomainImpl removeNode

INFO: Removed node: http://localhost:8100/nodeA
18-Nov-2007 15:48:25 org.apache.tuscany.sca.domain.impl.SCADomainImpl addNode
INFO: Registered node: http://localhost:8100/nodeA at endpoint http://localhost:
8100/nodeA
18-Nov-2007 15:48:25 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl start
INFO: Domain management configured from file:/H:/tuscany55/sca/modules/node-impl
/target/classes/
18-Nov-2007 15:48:26 org.apache.tuscany.sca.domain.impl.SCADomainImpl registerSe
rviceEndpoint
INFO: Registered service: DomainManagerComponent
18-Nov-2007 15:48:26 org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCAServi
ceBindingProvider 
WARNING: Unable to  register service: http://localhost: http://localhost:810
0/nodeA DomainManagerComponent org.apache.tuscany.sca.assembly.SCABinding http:/
/EUREKA:8100/DomainManagerComponent
org.apache.tuscany.sca.node.NodeException: org.apache.tuscany.sca.domain.DomainE
xception: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.Ru
ntimeException: org.apache.axis2.AxisFault: The module.xml file cannot be found
for the module: jar:file:/H:/tuscany55/sca/modules/binding-ws-axis2/target/tusca
ny-binding-ws-axis2-1.1-incubating-SNAPSHOT.jar!/org/apache/tuscany/sca/binding/
ws/axis2/engine/config/modules/rampart-1.3.mar
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 8.973 sec <<< FA
ILURE!
testCalculator(org.apache.tuscany.sca.node.impl.DomainDrivenTestCase)  Time elap
sed: 0.01 sec  <<< ERROR!
java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.DomainDrivenTestCase.testCalculator(
DomainDrivenTestCase.java:111)
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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMet
hodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethod
Runner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAn
dAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunne
r.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java
:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(Te
stClassMethodsRunner.java:75)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethod
sRunner.java:36)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClass
Runner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAn
dAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRu

Re: Remote references for non-existent services

2007-11-18 Thread Simon Laws
On Nov 17, 2007 6:21 PM, Jean-Sebastien Delfino <[EMAIL PROTECTED]>
wrote:

> Simon Laws wrote:
> > Should the domain api allow users to create service references to
> services
> > that don't exist in the domain yet. Currently they can and they get an
> > exception if they try and use it. This is consistent with the way that
> > references are injected into components work. I'm comfortable with it
> but
> > I'm raising it as it's potentially slightly counter intuitive for the
> api
> > user.
> >
> > Regards
> >
> > Simon
> >
> >
>
> Which API are you talking about?
>
> --
> Jean-Sebastien
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> For example, public  B getService(Class businessInterface,
String serviceName);

Simon


Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-18 Thread Simon Nash

I'm starting a new thread for this as suggested by Sebastien.

  Simon

Simon Laws wrote:


On Nov 15, 2007 6:54 PM, Simon Nash <[EMAIL PROTECTED]> wrote:

(cut)


I don't think we should put sample dependencies in the bin distro lib
folder.  If we need to include them in the bin distro (and I'm not 100%
convinced about that), then I think they should go in some other
directory.

An alternative approach would be to have a samples distro that contains
the samples plus dependencies that are only used by the samples and not
by the main runtime.  I think this is better as it allows us to add more
samples without pushing up the size of the main binary distro.



Personally I like to see samples with whatever I download and I'd rather
have a bigger binary distro than a separate download. If there is a real
need to reduce the distribution size can we do it in a different way, for
example, have groups of extensions (and their samples) distributed
separately?


Samples are very important for beginning users.  For users who have
moved beyond that stage and are doing real development using Tuscany,
samples are not very important.  If people in this category do want
samples, they are likely to just want to refer to samples source code
to cut and paste snippets as necessary.  Having pre-built sample binaries
isn't important for these users, and having the main lib directory
polluted/bloated by samples dependencies is a positive nuisance because
there's no easy way for them to find and remove the redundant files.

Having these files in Tuscany's lib directory isn't just wasting a few
bits on the disk.  It can be a problem if their version levels conflict
with other versions of the same code that the user has installed.
For "genuine" Tuscany dependencies, such conflicts are a real issue
that must be handled carefully in order to get Tuscany to co-exist with
their other software.  For sample dependencies, there is no actual
conflict unless the user needs to run the specific sample that pulled
in the dependency, but it might take them some time to figure out why
putting the Tuscany lib directory on the classpath is causing other
code in their application to break.

I'd suggest structuring the binary distribution as follows:

1. Tuscany runtime in "modules" and its dependencies in "lib".
   At the moment we have separate copies of the Tuscany runtime in
   "modules" and "lib" and I'm not quite sure why.
2. Tuscany samples source, READMEs and build files in "samples".
3. Tuscany samples binaries in "modules/samples", with their
   dependencies in "lib/samples".

By doing this we solve the conflict problems and it becomes a distro
size issue to decide whether 3 should be in the main binary distro
or available separately.  Since 3 will be clearly separated from 1
and 2, it will be easy to see how much extra size it is contributing.

The other dimension of splitting the distro by functional contents
is orthogonal to the above and is also worth exploring.  I'd suggest
the following distro packages:

1. Base runtime with functional capabilities that almost everyone
   will want to use, and associated samples.
2. A number of extension bundles (either depending only on the base,
   or possibly depending on other bundles), and associated samples.

If people think this approach makes sense then we could talk about
what the base distro and extension bundles should contain.

  Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Intermittent build failure in node-impl

2007-11-18 Thread Simon Laws
On Nov 18, 2007 7:16 PM, Simon Nash <[EMAIL PROTECTED]> wrote:

> When doing a top-level build of modules today from a fairly recent
> checkout
> of trunk, I got two errors in the node-impl tests.  Rerunning the build of
> this module from its own directory was successful.  Any ideas?  My stack
> trace output is below.
>
>   Simon
>
> ---
>  T E S T S
> ---
> Running org.apache.tuscany.sca.node.impl.DomainDrivenTestCase
> Setting up domain
> 18-Nov-2007 15:48:18 org.apache.tuscany.sca.domain.impl.SCADomainImpl init
> INFO: Domain management configured from
> file:/H:/tuscany55/sca/modules/domain-im
> pl/target/tuscany-domain-impl-1.1-incubating-SNAPSHOT.jar
> 18-Nov-2007 15:48:23 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
> 18-Nov-2007 15:48:24 org.apache.catalina.startup.ContextConfigdefaultWebConfig
> INFO: No default web.xml
> 18-Nov-2007 15:48:24 org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-
> 18-Nov-2007 15:48:24 org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.http.tomcat.TomcatServeraddServletM
> apping
> INFO: Added Servlet mapping: http://EUREKA:/domain/*
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.http.tomcat.TomcatServeraddServletM
> apping
> INFO: Added Servlet mapping:
> http://EUREKA:/DomainManagerComponent/DomainMan
> agerNodeEventService
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.http.tomcat.TomcatServeraddServletM
> apping
> INFO: Added Servlet mapping:
> http://EUREKA:/DomainManagerComponent/DomainMan
> agementService/*
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.http.tomcat.TomcatServeraddServletM
> apping
> INFO: Added Servlet mapping:
> http://EUREKA:/DomainManagerComponent/DomainMan
> agementService
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.http.tomcat.TomcatServeraddServletM
> apping
> INFO: Added Servlet mapping: http://EUREKA:/SCADomain/scaDomain.js
> Setting up calculator nodes
> 18-Nov-2007 15:48:25 
> org.apache.tuscany.sca.domain.impl.SCADomainImplremoveNode
>
> INFO: Removed node: http://localhost:8100/nodeA
> 18-Nov-2007 15:48:25 org.apache.tuscany.sca.domain.impl.SCADomainImpladdNode
> INFO: Registered node: http://localhost:8100/nodeA at endpoint
> http://localhost:
> 8100/nodeA
> 18-Nov-2007 15:48:25 org.apache.tuscany.sca.node.impl.SCADomainProxyImplstart
> INFO: Domain management configured from
> file:/H:/tuscany55/sca/modules/node-impl
> /target/classes/
> 18-Nov-2007 15:48:26 
> org.apache.tuscany.sca.domain.impl.SCADomainImplregisterSe
> rviceEndpoint
> INFO: Registered service: DomainManagerComponent
> 18-Nov-2007 15:48:26
> org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCAServi
> ceBindingProvider 
> WARNING: Unable to  register service: http://localhost:
> http://localhost:810
> 0/nodeA DomainManagerComponent 
> org.apache.tuscany.sca.assembly.SCABindinghttp:/
> /EUREKA:8100/DomainManagerComponent
> org.apache.tuscany.sca.node.NodeException:
> org.apache.tuscany.sca.domain.DomainE
> xception: org.apache.tuscany.sca.core.assembly.ActivationException:
> java.lang.Ru
> ntimeException: org.apache.axis2.AxisFault: The module.xml file cannot be
> found
> for the module:
> jar:file:/H:/tuscany55/sca/modules/binding-ws-axis2/target/tusca
>
> ny-binding-ws-axis2-1.1-incubating-SNAPSHOT.jar!/org/apache/tuscany/sca/binding/
> ws/axis2/engine/config/modules/rampart-1.3.mar
> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 8.973 sec
> <<< FA
> ILURE!
> testCalculator(org.apache.tuscany.sca.node.impl.DomainDrivenTestCase)
>  Time elap
> sed: 0.01 sec  <<< ERROR!
> java.lang.NullPointerException
> at
> org.apache.tuscany.sca.node.impl.DomainDrivenTestCase.testCalculator(
> DomainDrivenTestCase.java:111)
> 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.junit.internal.runners.TestMethodRunner.executeMethodBody
> (TestMet
> hodRunner.java:99)
> at org.junit.internal.runners.TestMethodRunner.runUnprotected
> (TestMethod
> Runner.java:81)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected
> (BeforeAn
> dAfterRunner.java:34)
> at org.junit.internal.runners.TestMethodRunner.runMethod
> (TestMethodRunne
> r.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(
> TestMethodRunner.java
> :45)
> at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(Te
> stClassMethodsRunner.java:75)
> at org.junit.internal.runners.TestClassMethodsR

[jira] Commented: (TUSCANY-1909) Conversational Component referring to another Conversational Component always uses the same instance

2007-11-18 Thread Simon Nash (JIRA)

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

Simon Nash commented on TUSCANY-1909:
-

Fix and test case checked in under revision 596162.

> Conversational Component referring to another Conversational Component always 
> uses the same instance
> 
>
> Key: TUSCANY-1909
> URL: https://issues.apache.org/jira/browse/TUSCANY-1909
> Project: Tuscany
>  Issue Type: Bug
>  Components: Java SCA Core Runtime
>Reporter: Mark Combellack
>Assignee: Simon Nash
> Fix For: Java-SCA-Next
>
> Attachments: ConversationalWire_HACK_DO_NOT_APPLY.patch, 
> ConversationalWireFix_itest.patch
>
>
> I've run into a problem with two conversational Services. Consider the 
> following scenario:
> AService
>   * Has member variable called state
>   * Has reference to BService
>   * Has set/getState method for setting state on A
>   * Has set/getStateOnB method for setting state on B
> BService
>   * Has member variable called state
> Calling SCADomain.getService(AService) twice, I am expecting to get:
>  AService_1 -> BService_1
> and  AService_2 -> BService_2
> However, I am getting:
>  AService_1 -> BService_1
> and  AService_2 -> BService_1
> i.e a second instance of BService is not being created.
> The first time I get a new instance of AService, a new instance of BService 
> is created.
> The second time I get a new instance of AService, the original BService 
> instance is shared.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (TUSCANY-1909) Conversational Component referring to another Conversational Component always uses the same instance

2007-11-18 Thread Simon Nash (JIRA)

 [ 
https://issues.apache.org/jira/browse/TUSCANY-1909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Nash resolved TUSCANY-1909.
-

Resolution: Fixed

> Conversational Component referring to another Conversational Component always 
> uses the same instance
> 
>
> Key: TUSCANY-1909
> URL: https://issues.apache.org/jira/browse/TUSCANY-1909
> Project: Tuscany
>  Issue Type: Bug
>  Components: Java SCA Core Runtime
>Reporter: Mark Combellack
>Assignee: Simon Nash
> Fix For: Java-SCA-Next
>
> Attachments: ConversationalWire_HACK_DO_NOT_APPLY.patch, 
> ConversationalWireFix_itest.patch
>
>
> I've run into a problem with two conversational Services. Consider the 
> following scenario:
> AService
>   * Has member variable called state
>   * Has reference to BService
>   * Has set/getState method for setting state on A
>   * Has set/getStateOnB method for setting state on B
> BService
>   * Has member variable called state
> Calling SCADomain.getService(AService) twice, I am expecting to get:
>  AService_1 -> BService_1
> and  AService_2 -> BService_2
> However, I am getting:
>  AService_1 -> BService_1
> and  AService_2 -> BService_1
> i.e a second instance of BService is not being created.
> The first time I get a new instance of AService, a new instance of BService 
> is created.
> The second time I get a new instance of AService, the original BService 
> instance is shared.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Remote references for non-existent services

2007-11-18 Thread Jean-Sebastien Delfino

Simon Laws wrote:

On Nov 17, 2007 6:21 PM, Jean-Sebastien Delfino <[EMAIL PROTECTED]>
wrote:


Simon Laws wrote:

Should the domain api allow users to create service references to

services

that don't exist in the domain yet. Currently they can and they get an
exception if they try and use it. This is consistent with the way that
references are injected into components work. I'm comfortable with it

but

I'm raising it as it's potentially slightly counter intuitive for the

api

user.

Regards

Simon



Which API are you talking about?

--
Jean-Sebastien


For example, public  B getService(Class businessInterface,

String serviceName);

Simon




I think we need to distinguish between "existent" and "started":
- existent meaning "added to the domain"
- started meaning "currently running on a node in the domain"

With that distinction:
- adding to the domain a component with a reference to a non-existent 
service should give a warning
- starting a component with a reference to a non-existent service should 
give an error
- starting a component with a reference to an existent but not started 
service should work


Similarly, and since getService is an API involving running code:
- getService() of a non-existent service should give an error
- getService() of an existent but not started service should work

Finally getService of an existent and started service should work as 
well, hopefully :)


--
Jean-Sebastien

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



It seems a problem inside our json support module

2007-11-18 Thread shaoguang geng
Hi, developers:

I am not farmilar with JSON before, but I 'm learing it recently, since it has 
became a import wep applicatioin standard now.

I check binding-json and databinding-json, they all seems good.

But a problem came out from alert-aggregator-webapp when JSON2XMLStreamReader 
transform JSONObject.

I checked specs on http://badgerfish.ning.com/, it seems our input data 
structure as a little problem.

I 'm looking for a work around inside the tuscany's code, but if any one knows 
how, please give me a clue.



   
-
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Re: It seems a problem inside our json support module

2007-11-18 Thread Luciano Resende
Please provide more information about the issue you are seeing...
There has been some issues found recently, that are being fixed and/or
discussed. Also, I'm assuming you are using trunk code, is this
correct ?

On Nov 18, 2007 10:26 PM, shaoguang geng <[EMAIL PROTECTED]> wrote:
> Hi, developers:
>
> I am not farmilar with JSON before, but I 'm learing it recently, since it 
> has became a import wep applicatioin standard now.
>
> I check binding-json and databinding-json, they all seems good.
>
> But a problem came out from alert-aggregator-webapp when JSON2XMLStreamReader 
> transform JSONObject.
>
> I checked specs on http://badgerfish.ning.com/, it seems our input data 
> structure as a little problem.
>
> I 'm looking for a work around inside the tuscany's code, but if any one 
> knows how, please give me a clue.
>
>
>
>
> -
> Get easy, one-click access to your favorites.  Make Yahoo! your homepage.



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]