This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes CXF Logging inbound\outbound messages problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "CXF Logging inbound\outbound messages problem." Watch "CXF Logging inbound\outbound messages problem." New topic
Author

CXF Logging inbound\outbound messages problem.

Serkan Akti
Greenhorn

Joined: Aug 14, 2012
Posts: 2

Hii,
I've developed WSDL first web-services with CXF (Web Service Server) . My services works fine but when i configure it for inbound/outbound message logging i am getting error at the time of requesting.

For inbound/outbound logging i've added the lines at below in cxf-servlet.xml;

<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>

With this configuration i am getting exception when i call the service from soap client, Here is the Exception;

WARNING: Interceptor for has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.interceptor.AbstractLoggingInterceptor.getMessageLogger(AbstractLoggingInterceptor.java:79)
at org.apache.cxf.interceptor.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:74)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.transport.MultipleEndpointObserver.onMessage(MultipleEndpointObserver.java:99)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)




Abhijit Durge
Greenhorn

Joined: Oct 31, 2012
Posts: 9
Hello Serkan,

The Nullpointer exception can occur due to following conditions.
a) Message object is null
b) Exchange Object is null
c) Endpoint Object is null

Please try the alternate way of providing configuration for logging



or




 
 
subject: CXF Logging inbound\outbound messages problem.
 
Similar Threads
Apache CXF 2.4.1 + WS Security issue.
org.apache.cxf.interceptor.Fault: Marshalling Error: null
Problem getting output using CXF & Spring
Cannot convert DataHandler to JMS mesage