Announcement Announcement Module
No announcement yet.
Handler method 'null' threw an Exception. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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

    	<message-bus error-channel="errorChannel"/>
    	<context:component-scan base-package=""/>
    	<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
    Handler method 'null' threw an Exception.
    Here is my errorListener class.

    #MessageEndpoint (input="errorChannel")
    public class errorListener {
    	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.

    Handler method 'public java.lang.String 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


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