I got following exception by build 668091:

java.lang.IndexOutOfBoundsException
        at java.util.ArrayList.get(Unknown Source)
        at 
org.apache.tuscany.sca.core.context.CallableReferenceImpl.<init>(CallableReferenceImpl.java:122)
        at 
org.apache.tuscany.sca.core.context.ServiceReferenceImpl.<init>(ServiceReferenceImpl.java:83)
        at 
org.apache.tuscany.sca.core.context.ComponentContextImpl.getServiceReference(ComponentContextImpl.java:226)
        at 
org.apache.tuscany.sca.core.context.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:191)
        at 
org.apache.tuscany.sca.core.context.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:159)
        at 
org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain.getServiceReference(EmbeddedSCADomain.java:225)


When I see the code of CallableReferenceImpl.java, I found following:

line 119:        if (this.binding == null) {
line 120:            this.binding = this.reference.getBinding(SCABinding.class);
line 121:            if (this.binding == null) {
line 122:                this.binding = this.reference.getBindings().get(0);
line 123:            }
line 124:        }


Surely in my case, this.reference.getBindings() returns an empty List.

Following is part of my composite:

<component name="BComponent1">
        <implementation.java class="....BService1Impl"/>
        <service name="BService1">
                <interface.java interface=".....BService1"/>
                <binding...."/>
        </service>
</component>

Does anyone know why that happen, so that I can fix my composite?

Thanks
Gilbert

Reply via email to