Fahim, I wonder if the problem is the case of your reference in SCDL.
You have .. * <reference name="ConversionService" *But in the Java impl (CalculatorServiceImpl ) it looks like the reference name is "conversionService" (lowercase 'c'). Maybe try that.... Scott On Tue, Dec 9, 2008 at 7:41 AM, fahim salim <[EMAIL PROTECTED]> wrote: > Hello All > > What I'd like to do is to have two components implemented as composite > (like in simple-bigbank) > CalculatorServiceComponent is implemented by Calculator.composite and > ConversionServiceComponent is implemented by Converter.composite > ConversionService is a reference for CalculatorServiceComponent. > > Here is the composite file for this configuration > > *<?xml version="1.0" encoding="ISO-8859-15"?> > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > targetNamespace="http://calcul" > xmlns:ca="http://calculator" > xmlns:co="http://converter" > name="Calcul"> > > <component name="CalculatorServiceComponent"> > <implementation.composite name="ca:Calculator"/> > <reference name="ConversionService" > target="ConversionServiceComponent"> > <binding.sca/> > </reference> > </component> > > <component name="ConversionServiceComponent"> > <implementation.composite name="co:Converter"/> > </component> > > </composite>* > > ConversionService offers one method which is *conversionEnEuro()* > > *public interface ConversionService { > public double conversionEnEuro(double value); > }* > > > > When I run the application I have the following stack trace error but I > can't understand what is going wrong. It seems that the proxy which is > returned doesn't know how to invoke the method of ConversionService but why > ? > > class $Proxy6 > Caught Exception: null > java.lang.NullPointerException > at > calculator.CalculatorServiceImpl.conversionEnEuro(CalculatorServiceImpl.java:43) > 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:132) > at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112) > at > org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) > at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) > at $Proxy6.conversionEnEuro(Unknown Source) > at client.Client.main(Client.java:45) > > I have enclosed all the files > > Thanks for your help > > Fahim > > > > > >
