In looking at the 0.95 Java C&I spec (and it looks to be done the same
way in the draft 1.0 spec) I see that it should be possible to have
multiple references collected up in a list using an annotation such as
the following:

@Reference(name="helloService", required=true)
public List<HelloService> helloServices;

However attempting this gives me the following error:

org.apache.tuscany.spi.builder.BuilderConfigException: Incompatible
source and target interfaces
Context stack trace: [application][ClientComponent]
        at 
org.apache.tuscany.core.builder.ConnectorImpl.checkIfWireable(ConnectorImpl.java:451)
        at 
org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java:381)
        at 
org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java:101)
        at 
org.apache.tuscany.spi.extension.CompositeComponentExtension.prepare(CompositeComponentExtension.java:460)
        at 
org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.java:86)
        at 
org.apache.tuscany.core.launcher.LauncherImpl.bootApplication(LauncherImpl.java:195)
        at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:65)
        at scademo.ClientServiceImplTest.setUp(ClientServiceImplTest.java:13)
        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 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.tuscany.spi.wire.IncompatibleServiceContractException:
Operation not found on target [hashCode]
        at 
org.apache.tuscany.spi.wire.WireServiceExtension.checkCompatibility(WireServiceExtension.java:75)
        at 
org.apache.tuscany.core.builder.ConnectorImpl.checkIfWireable(ConnectorImpl.java:448)
        ... 20 more

Should this be working in M2?  Is this broken or is multiplicity per
the spec not supported at this time?

-Bert

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

Reply via email to