Results 1 to 6 of 6

Thread: Null pointer exception when using a gateway.

  1. #1

    Default 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. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

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

  3. #3
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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.

  4. #4

    Default

    Great, thanks for the prompt response.

  5. #5
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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.

  6. #6

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •