I'm trying to create a gateway using an interface that extends another interface
e.g.
And the following gateway:Code:interface A { @Gateway(requestChannel="a") public Integer methodA(Integer in); } interface B extends A { @Gateway(requestChannel="b") public Integer methodB(Integer in); }
When I call methodB on the gateway I get a null pointer exception:Code:<gateway id="gatewayB" service-interface="B" />
[yunitint] java.lang.NullPointerException
[yunitint] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
[yunitint] at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
[yunitint] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
[yunitint] at java.lang.reflect.Method.invoke(Method.java:597)
[yunitint] at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:309)
[yunitint] at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:183)
[yunitint] at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :150)
[yunitint] at org.springframework.integration.gateway.GatewayPro xyFactoryBean.doInvoke(GatewayProxyFactoryBean.jav a:273)
[yunitint] at org.springframework.integration.gateway.GatewayPro xyFactoryBean.invoke(GatewayProxyFactoryBean.java: 257)
[yunitint] at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
[yunitint] at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
Can anybody tell me if this is a problem with my approach, a problem with spring integration or a problem with the AOP framework?


Reply With Quote