Hi,
I am using SCA to publish Spring Bean as Service,
In Spring config file:
I use those line define a bean:
<bean name="testService" class="com.temp.TestServiceImpl" />
and use sca:service to deploy this bean as serviceļ¼
<sca:service name="TestService" type="com.temp.TestService"
target="testService"/>
but When I invoke this service's method with remote reference there
will throw a exception :
[DEBUG]Get TestService:[Proxy -
org.apache.tuscany.sca.core.invocation.jdkinvocationhand...@14ce5eb]
Exception in thread "main" java.lang.NullPointerException
at
org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.setupMethod(SpringInvoker.java:75)
at
org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.doInvoke(SpringInvoker.java:86)
at
org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.invoke(SpringInvoker.java:113)
at
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60)
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:129)
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:104)
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:98)
...
But when I use this line to define spring bean:
<bean id="testService" class="com.shine.temp.TestServiceImpl" />
Remote invoke is OK.
I think this maybe a BUG in Tuscany's Spring implement.
in spring, use "name" or "id" property to define a bean is equal.
but combine with Tuscany Spring Implement, that seems Tuscany Spring
implement use "id" to find bean instead of find "id" and "name" both.
Can any body check this question?
Regard.
--
========================
Knight Chen