Announcement Announcement Module
Collapse
No announcement yet.
Null pointer exception when using a gateway. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Null pointer exception when using a gateway.

    I'm trying to create a gateway using an interface that extends another interface

    e.g.

    Code:
    interface A
    {
    	@Gateway(requestChannel="a")
    	public Integer methodA(Integer in);
    }
    
    interface B extends A
    {
    	@Gateway(requestChannel="b")
    	public Integer methodB(Integer in);
    }
    And the following gateway:

    Code:
    <gateway id="gatewayB" service-interface="B" />
    When I call methodB on the gateway I get a null pointer exception:

    [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?

  • #2
    Tom, this is a bug. We still trying to determine the details. Will let you know.

    Comment


    • #3
      Tom here is the issue that I created. There are more details there. It should be fixed by tomorrow and will be available in the next nightly build and obviously in 2.0.1 release which should also be out by the end of the week.

      https://jira.springsource.org/browse/INT-1689

      Thank you for reporting it.

      Comment


      • #4
        Great, thanks for the prompt response.

        Comment


        • #5
          Tom, the issue has been resolved so you can try it with tonights nightly build or wait for the 2.0.1 which should be tomorrow.

          Comment


          • #6
            I'll give it a test with the 2.0.1 release. Thanks.

            Comment

            Working...
            X