I followed the article which is "Your first SCA application" on the dashboard 
of Tuscany.
http://www.devx.com/IBMSCA/Article/39358

But it does not work. After I ran "MyLuncher", I got this
Exception in thread "main" org.osoa.sca.ServiceRuntimeException: 
org.apache.tuscany.sca.monitor.MonitorRuntimeException: Reference not found for 
component reference: Component = CalculatorServiceComponent Reference = 
addService
        at 
org.apache.tuscany.sca.node.impl.NodeImpl.analyzeProblems(NodeImpl.java:713)

Ok, I removed all reference and change the method to return some hardcoded 
value. I just want to verify the service got executed
Then I got this exception
Exception in thread "main" org.osoa.sca.ServiceRuntimeException: No service is 
declared on component CalculatorServiceComponent
        at 
org.apache.tuscany.sca.core.context.ComponentContextHelper.getSingleService(ComponentContextHelper.java:310)

If I added the service configuration in composite xml
<component name="CalculatorServiceComponent">
    <implementation.java class="pojoCalculator.PojoCalculatorServiceImpl"/>
    <service name="calculateService">
                        <interface.java 
interface="calculator.CalculatorService" />
        </service>
  </component>
Then I got this exception
Exception in thread "main" org.osoa.sca.ServiceUnavailableException: Unable to 
create SCA binding invoker for local target CalculatorServiceComponent 
reference $self$.calculateService (bindingURI=/CalculatorServiceComponent 
operation=add)
        at 
org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:215)



Reply via email to