You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Lou Amodeo (JIRA)" <tu...@ws.apache.org> on 2006/12/18 19:04:21 UTC

[jira] Created: (TUSCANY-1000) Components do not support multiple services

Components do not support multiple services
-------------------------------------------

                 Key: TUSCANY-1000
                 URL: http://issues.apache.org/jira/browse/TUSCANY-1000
             Project: Tuscany
          Issue Type: Bug
    Affects Versions: Java-M2
            Reporter: Lou Amodeo


I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  

@Service(interfaces={ConversationsClient.class,ConversationsClient2.class})

public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	


-------------------------------------------------------------------------------
Test set: org.apache.tuscany.sca.test.ConversationsITest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)




          

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Closed: (TUSCANY-1000) Components do not support multiple services

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

Raymond Feng closed TUSCANY-1000.
---------------------------------


> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-SCA-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-SCA-M3
>
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
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-1000) Components do not support multiple services

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

Lou Amodeo updated TUSCANY-1000:
--------------------------------

    Component/s: Java SCA Core

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1000) Components do not support multiple services

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

Luciano Resende updated TUSCANY-1000:
-------------------------------------

        Fix Version/s: Java-M3
    Affects Version/s:     (was: Java-M2)
                       Java-M3

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-M3
>
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1000) Components do not support multiple services

Posted by "Lou Amodeo (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-1000?page=comments#action_12459741 ] 
            
Lou Amodeo commented on TUSCANY-1000:
-------------------------------------

I also added some trace to this locate code and it doesnt look like the componentName/serviceName comes into play with this matching logic?

[[INFO] [tuscany-itest:start {execution: start}]
[INFO] Starting Tuscany...
[INFO] [tuscany-itest:test {execution: test}]
[INFO] Executing tests...
LAA: locateService for ServiceName:ConversationsClient/ConversationsClient
LAA: Child:[AnotherService] in state [RUNNING]
LAA: Child:[ConversationLifeCycleService] in state [RUNNING]
LAA: Child:[ConversationsClient] in state [RUNNING]
LAA: Child:[ConversationsService] in state [RUNNING]
LAA: Child keys:AnotherService
LAA: Child keys:ConversationLifeCycleService
LAA: Child keys:ConversationsClient
LAA: Child keys:ConversationsService
[INFO] Test results: {skipped=0, completedCount=1, failures=0, errors=1}
[INFO] ------------------------------------------------------------------------

CompositeComponentExtension.java 

   public <T> T locateService(Class<T> serviceInterface, String name) {
        
        System.out.println("LAA: locateService for ServiceName:" + name);
        for (SCAObject child : children.values()) {
           System.out.println("LAA: Child:" +  child.toString());
        } 

      for (String child : children.keySet()) {
           System.out.println("LAA: Child keys:" +  child);
        } 


        SCAObject target = children.get(name);
        if (target == null) {
            TargetNotFoundException e = new TargetNotFoundException(name);
            e.addContextName(getName());
            throw e;
        }
        return serviceInterface.cast(target.getServiceInstance());
    }


> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-1000) Components do not support multiple services

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

Luciano Resende resolved TUSCANY-1000.
--------------------------------------

    Resolution: Fixed

Thanks Lou for verifying that this is no longer occurs.

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-SCA-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-SCA-M3
>
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1000) Components do not support multiple services

Posted by "Lou Amodeo (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-1000?page=comments#action_12459730 ] 
            
Lou Amodeo commented on TUSCANY-1000:
-------------------------------------

Hi,  I have tried a few permutations of this and it doesn't appear to be functioning unless I change the @Service and remove the multiple interfaces.   I did notice that I did not correctly specify the componentName/seviceName the first time.  I left off the componentName. However when I add the component name as specified in the default.scdl I receive an exception.  I assume the componentName will be taken for the 
default.scdl and the serviceName's will be derived from the @Service  interface class names resulting in the string specified below?    
 
Here is the client locate()

aConversationsClient = CurrentCompositeContext.getContext().locateService(ConversationsClient. class, ConversationsClient/ConversationsClient"); 
The @Service annotation:

@Service

(interfaces={ConversationsClient.class,ConversationsClient2.class }) 
The class definition: (note this client component also impliments a callback interface)  

public

class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback { 
The default.scdl:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"

name="ConversationsTest">


<component name="ConversationsClient">

<implementation.java class="org.apache.tuscany.sca.test.ConversationsClientImpl"/>

<reference name="aService"> 

ConversationsService 

</reference>

<reference name="anotherService"> 

AnotherService 

</reference>

<reference name="aLifeCycleService"> 

ConversationLifeCycleService 

</reference> 

</component> 


<component name="ConversationsService">

<implementation.java class="org.apache.tuscany.sca.test.ConversationsServiceImpl"/>

</component>


<component name="AnotherService">

<implementation.java class="org.apache.tuscany.sca.test.AnotherServiceImpl"/>

</component>


<component name="ConversationLifeCycleService">

<implementation.java class="org.apache.tuscany.sca.test.ConversationsLifeCycleServiceImpl"/>

</component> 


</composite>  


The exception:

-------------------------------------------------------------------------------
Test set: org.apache.tuscany.sca.test.ConversationsITest
------------------------------------------------------------------------------- 
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE!
testConversations(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0.01 sec  <<< ERROR!
org.apache.tuscany.spi.component.TargetNotFoundException : ConversationsClient/ConversationsClient
Context stack trace: [application]
 at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:270)



> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1000) Components do not support multiple services

Posted by "Lou Amodeo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466089 ] 

Lou Amodeo commented on TUSCANY-1000:
-------------------------------------

I agree this no longer occurs.  If you work around the TUSCANY-1046 there is still an issue / discrepancy with spec on referencing a service when multiple service interfaces are implemented.  I will open a new JIRA for this.  Please close this one. 

   -------------------------------------------------------------------------------
Test set: org.apache.tuscany.sca.test.ConversationsITest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE!
testConversations(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
org.osoa.sca.ServiceRuntimeException: Service not found [ConversationsClient/ConversationsClient]
	at org.apache.tuscany.core.implementation.composite.AbstractCompositeContext.getInboundWire(AbstractCompositeContext.java:84)
	at org.apache.tuscany.core.implementation.composite.AbstractCompositeContext.locateService(AbstractCompositeContext.java:66)
	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:18)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-SCA-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-SCA-M3
>
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-1000) Components do not support multiple services

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-1000?page=all ]

Jim Marino reassigned TUSCANY-1000:
-----------------------------------

    Assignee: Jim Marino

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1000) Components do not support multiple services

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465931 ] 

Raymond Feng commented on TUSCANY-1000:
---------------------------------------

Hi,

I don't see this problem any more. I also search the trunk code and there's no such exception with the given message. But I run into the same issue as TUSCANY-1046.

Thanks,
Raymond

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-SCA-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-SCA-M3
>
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1000) Components do not support multiple services

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

Lou Amodeo updated TUSCANY-1000:
--------------------------------

    Component/s: Java SCA Integration Tests

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1000) Components do not support multiple services

Posted by "Jeremy Boynes (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-1000?page=comments#action_12459432 ] 
            
Jeremy Boynes commented on TUSCANY-1000:
----------------------------------------

This should happen if you do not specify componentName/serviceName in the call to locateService.

Please could you attach the code where you make that call (showing the name passed in).

> Components do not support multiple services
> -------------------------------------------
>
>                 Key: TUSCANY-1000
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-1000
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-M2
>            Reporter: Lou Amodeo
>
> I have a component that implements multiple service interfaces at runtime the locateService() receives an exception indicating that components can only have 1 service.  The C&I spec states that a component can declare using @Service an array of interfaces.  
> @Service(interfaces={ConversationsClient.class,ConversationsClient2.class})
> public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback {	
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.ConversationsITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE!
> testCallBackSetCallback(org.apache.tuscany.sca.test.ConversationsITest)  Time elapsed: 0 sec  <<< ERROR!
> org.apache.tuscany.spi.component.TargetException: Component must have exactly one service
> 	at org.apache.tuscany.core.implementation.java.JavaAtomicComponent.getServiceInstance(JavaAtomicComponent.java:72)
> 	at org.apache.tuscany.spi.extension.CompositeComponentExtension.locateService(CompositeComponentExtension.java:268)
> 	at org.apache.tuscany.core.launcher.CompositeContextImpl.locateService(CompositeContextImpl.java:65)
> 	at org.apache.tuscany.sca.test.ConversationsITest.setUp(ConversationsITest.java:17)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.run(TuscanyITestMojo.java:122)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.runSurefire(TuscanyITestMojo.java:88)
> 	at org.apache.tuscany.sca.plugin.itest.TuscanyITestMojo.execute(TuscanyITestMojo.java:77)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>           

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org