Hi Ian
I also got this exception today. But I tink this occurs when a response to
the HTTP input is not set.
try this as the MessageExchangeListener
public void onMessageExchange(MessageExchange exchange)
throws MessagingException {
NormalizedMessage message = getInMessage(exchange);
try {
// on recieving first send an acknowledgement
NormalizedMessage outMessage =
exchange.createMessage();
outMessage.setContent(CapeUtils.createSource("<Received/>"));
((MessageExchangeImpl)
exchange).setOutMessage(outMessage);
process(exchange, message);
done(exchange);
} catch (MessagingException e) {
fail(exchange, e);
}
}
Thanks
Anshuman Das
-----Original Message-----
From: Ian de Beer [mailto:[EMAIL PROTECTED]
Sent: Monday, November 07, 2005 6:34 PM
To: [email protected]
Subject: [servicemix-user] HTTP Binding Example gives null pointer
exception
Hi
I have tried the HTPPBinding example from both the 2.0 SNAPSHOT and
the 1.1 release. On both of these I get the following exception. (The
1.0.1 release does not have this problem.)
[INFO] DeliveryChannel - default destination serviceName for
httpReceiver = {http://servicemix.org/demo/}stockQuote
14:29:07.121 WARN!! Exception for /
java.lang.NullPointerException
at org.servicemix.components.http.HttpMarshaler.toResponse
(HttpMarshaler.java:65)
at
org.servicemix.components.http.HttpInOutBinding.processInOut
(HttpInOutBinding.java:63)
at org.servicemix.components.http.HttpInOutBinding.process
(HttpInOutBinding.java:46)
at org.servicemix.components.http.BindingServlet.doPost
(BindingServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:354)
at org.mortbay.jetty.servlet.ServletHandler.dispatch
(ServletHandler.java:657)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service
(HttpConnection.java:790)
at org.mortbay.http.HttpConnection.handleNext
(HttpConnection.java:961)
at org.mortbay.http.HttpConnection.handle
(HttpConnection.java:807)
at org.mortbay.http.SocketListener.handleConnection
(SocketListener.java:197)
at org.mortbay.util.ThreadedServer.handle
(ThreadedServer.java:276)
at org.mortbay.util.ThreadPool$PoolThread.run
(ThreadPool.java:511)
I noticed there is a Jira issue (SM-125) that is somewhat similar,
but it applies to Invalid messages. In my case I am running the
example with the supplied request.xml and also get the reported
exception.
Regards
Ian