Announcement Announcement Module
Collapse
No announcement yet.
Handler method 'null' threw an Exception. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handler method 'null' threw an Exception.

    hi all

    First of all i have to say that I'm totally newbie to Spring Integration. I'm playing with cafe demo adding support to Message Bus's error-channel and throwing exceptios from handler methods. Here is my configuration xml

    Code:
    	<message-bus error-channel="errorChannel"/>
    	<annotation-driven/>
    
    	<context:component-scan base-package="org.springframework.integration.samples.cafe"/>
    
    	<channel id="errorChannel" publish-subscribe="true" />
    	<channel id="orders"/>
    	<channel id="drinks"/>
    	<channel id="coldDrinks"/>
    	<channel id="hotDrinks"/>
    
    	<handler-endpoint input-channel="coldDrinks" handler="barista" method="prepareColdDrink" />
    	<handler-endpoint input-channel="hotDrinks" handler="barista" method="prepareHotDrink" />
    I have an errorListener class subscribed to errorChannel, and it log exceptions throwed from prepareColdDrink or prepareHotDrink, but it doesn't get any descriptive information about the exception, only
    Code:
    Handler method 'null' threw an Exception.
    Here is my errorListener class.

    Code:
    #MessageEndpoint (input="errorChannel")
    public class errorListener {
    	
    	#Handler
    	public void handle(Message message) {
    		System.out.println("errorListener: "+message.getPayload());
    	}
    (I have substituted 'at' symbols by # because forum's URL filter)

    If the DrinkRouter throws the exception i get a little more descriptive message. The complete path of the method that throwed the exception.

    Code:
    Handler method 'public java.lang.String org.springframework.integration.samples.cafe.DrinkRouter.resolveDrinkChannel(org.springframework.integration.samples.cafe.Drink) throws java.lang.Exception' threw an Exception.
    I would know what is needed to get, at least, the name of the method that caused the exception.

    It would be nice to get a more descriptive information about the exception in errorChannel.

  • #2
    Ok guys, i have found the answer by myself, just googlin' around

    osintegration.blogspot.com

    Comment


    • #3
      Hi would you like to share with all of us how you resolved this , as I am also gettin

      Comment

      Working...
      X