You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Mark Combellack (JIRA)" <tu...@ws.apache.org> on 2008/02/04 13:09:08 UTC

[jira] Created: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Problem using implementation.composite that is another implementation.composite with promoted references
--------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-2027
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-Next
         Environment: svn revision 609904
Linux
            Reporter: Mark Combellack
             Fix For: Java-SCA-Next
         Attachments: recursive2.jar

I am having problems with a sample application that attempts to use nested implementation.composites and references

I have an application that has:

A lowest level composite (Called CComposite) that has two promoted references:

    <service name="CService" promote="CComponent">
        <interface.java interface="samples.C"/>
        <binding.sca/>
    </service>

    <reference name="PromotedRefX" promote="CComponent/refX">
        <interface.java interface="samples.X"/>
        <binding.sca/>
    </reference>

    <reference name="PromotedRefY" promote="CComponent/refY">
        <interface.java interface="samples.Y"/>
        <binding.sca/>
    </reference>

    <component name="CComponent">
        <implementation.java class="samples.CImpl"/>
        <reference name="refX"/>
        <reference name="refY"/>
    </component>




This is then used by another Composite (called BComposite):

    <service name="BService" promote="BComponent">
        <interface.java interface="samples.C"/>
        <binding.sca/>
    </service>

    <component name="BComponent">
        <implementation.composite name="sample:CComposite"/>

        <reference name="PromotedRefX" target="XComponent"/>
        <reference name="PromotedRefY" target="YComponent"/>
    </component>

    <component name="XComponent">
		<implementation.java class="samples.XImpl"/>
    </component>

    <component name="YComponent">
        <implementation.java class="samples.YImpl"/>
    </component>



This is then used by another composite (called AComposite):

    <service name="AService" promote="AComponent">
        <interface.java interface="samples.C"/>
    </service>


    <component name="AComponent">
        <implementation.composite name="sample:BComposite"/>
    </component>




I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running nested.NestedTestCase
Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
        at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
        at $Proxy6.xOp(Unknown Source)
        at samples.CImpl.cOp(CImpl.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
        at $Proxy5.cOp(Unknown Source)
        at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)


Results :

Tests in error: 
  testAComponent(nested.NestedTestCase)

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0





I have a second test that looks up BComponent directly and runs the same code and this test passes.


-- 
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


[jira] Updated: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Combellack updated TUSCANY-2027:
-------------------------------------

    Attachment: recursive2.jar

Test case that illustrates the problem

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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


[jira] Commented: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565399#action_12565399 ] 

Mark Combellack commented on TUSCANY-2027:
------------------------------------------

I've managed to find the problem. It appears to be in CompositeWireBuilder in the assembly project.

The code for recursing down through composites for resolving references has been commented out with a comment that this is no longer required. This is partially true. If the nesting of composites extends only to one level then it is not needed. However, if you nest to many levels, it is necessary to recurse down the composites.

Basically, I am going to uncomment the following code in the wireCompositeReferences() method of CompositeWireBuilder:

        // Process nested composites recursively
        for (Component component : composite.getComponents()) {
            Implementation implementation = component.getImplementation();
            if (implementation instanceof Composite) {
                wireCompositeReferences((Composite)implementation);
            }
        }


I'm doing a local build at the moment to ensure that I have not broken anything else.

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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


[jira] Resolved: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Combellack resolved TUSCANY-2027.
--------------------------------------

    Resolution: Fixed

Nested Composite References now work. Marking as fixed.

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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


[jira] Commented: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565316#action_12565316 ] 

Mark Combellack commented on TUSCANY-2027:
------------------------------------------

Whilst debugging the code, the problem appears to be around the RuntimeSCAReferenceBindingProvider. 

The createInvoker() method is called, which finds the wire and calls getInvoker()

The getInvoker() method attempts to get the Contract off the target by calling target.getContract() but the contract is null so it cannot create an Invoker for the opreation

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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


[jira] Assigned: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Combellack reassigned TUSCANY-2027:
----------------------------------------

    Assignee: Mark Combellack

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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


[jira] Commented: (TUSCANY-2027) Problem using implementation.composite that is another implementation.composite with promoted references

Posted by "Mark Combellack (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565551#action_12565551 ] 

Mark Combellack commented on TUSCANY-2027:
------------------------------------------

SVN commit #618442 fixes the problem with nested composite references

SVN commit #618447 adds a test to recursive iTest for nested composites with references.

> Problem using implementation.composite that is another implementation.composite with promoted references
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2027
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2027
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>         Environment: svn revision 609904
> Linux
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: recursive2.jar
>
>
> I am having problems with a sample application that attempts to use nested implementation.composites and references
> I have an application that has:
> A lowest level composite (Called CComposite) that has two promoted references:
>     <service name="CService" promote="CComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <reference name="PromotedRefX" promote="CComponent/refX">
>         <interface.java interface="samples.X"/>
>         <binding.sca/>
>     </reference>
>     <reference name="PromotedRefY" promote="CComponent/refY">
>         <interface.java interface="samples.Y"/>
>         <binding.sca/>
>     </reference>
>     <component name="CComponent">
>         <implementation.java class="samples.CImpl"/>
>         <reference name="refX"/>
>         <reference name="refY"/>
>     </component>
> This is then used by another Composite (called BComposite):
>     <service name="BService" promote="BComponent">
>         <interface.java interface="samples.C"/>
>         <binding.sca/>
>     </service>
>     <component name="BComponent">
>         <implementation.composite name="sample:CComposite"/>
>         <reference name="PromotedRefX" target="XComponent"/>
>         <reference name="PromotedRefY" target="YComponent"/>
>     </component>
>     <component name="XComponent">
> 		<implementation.java class="samples.XImpl"/>
>     </component>
>     <component name="YComponent">
>         <implementation.java class="samples.YImpl"/>
>     </component>
> This is then used by another composite (called AComposite):
>     <service name="AService" promote="AComponent">
>         <interface.java interface="samples.C"/>
>     </service>
>     <component name="AComponent">
>         <implementation.composite name="sample:BComposite"/>
>     </component>
> I have a unit test that tries to use AComponent. However, when I invoke an operation on the Service, I get the following exception:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running nested.NestedTestCase
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@17aece8]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@29c58e]
> Deployed names = [XComponent, AComponent, BComponent, YComponent, CComponent]
> Setting X on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1980630]
> Setting Y on CImpl to [Proxy - org.apache.tuscany.sca.core.invocation.JDKInvocationHandler@1be4777]
> Method call returned [C:cOp() - xResult = X:xOp() yResult = Y:yOp()]
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.667 sec <<< FAILURE!
> testAComponent(nested.NestedTestCase)  Time elapsed: 1.434 sec  <<< ERROR!
> org.osoa.sca.ServiceUnavailableException: Service not found for component CComponent reference refX (bindingURI=null operation=xOp). Ensure that the composite containing the service is loaded and started somewhere in the SCA domain and that if running in a remote node that the interface of the target service marked as @Remotable
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:225)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:213)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:155)
>         at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:205)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:139)
>         at $Proxy6.xOp(Unknown Source)
>         at samples.CImpl.cOp(CImpl.java:33)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:248)
>         at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:145)
>         at $Proxy5.cOp(Unknown Source)
>         at nested.NestedTestCase.testAComponent(NestedTestCase.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>         at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Results :
> Tests in error: 
>   testAComponent(nested.NestedTestCase)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
> I have a second test that looks up BComponent directly and runs the same code and this test passes.

-- 
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