This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat  and CXF -> NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat  and CXF -> NullPointerException" Watch "Tomcat  and CXF -> NullPointerException" New topic

Tomcat and CXF -> NullPointerException

J. Sailer

Joined: Jan 23, 2012
Posts: 1
we just did an implementation of a webservice-request based on Apache CXF 2.4.5. It is working perfect as long we do not try to use this implemention within any servlet and/or application running on a Tomcat (7.0.11 / 7.0.25). The resulting Stacktrace looks like this:

SCHWERWIEGEND: Servlet.service() for servlet [VrTestServlet] in context with path [/WebTest] threw exception [Servlet execution threw an exception] with root cause
at java.util.ResourceBundle.getBundle(
at org.apache.cxf.common.i18n.BundleUtils.getBundle(
at org.apache.cxf.transport.DestinationFactoryManagerImpl.<clinit>(
at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(
at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(
at org.apache.cxf.bus.CXFBusFactory.createBus(
at org.apache.cxf.bus.CXFBusFactory.createBus(
at org.apache.cxf.bus.CXFBusFactory.createBus(
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(
at org.apache.cxf.BusFactory.getDefaultBus(
at org.apache.cxf.BusFactory.createThreadBus(
at org.apache.cxf.BusFactory.getThreadDefaultBus(
at org.apache.cxf.BusFactory.getThreadDefaultBus(
at org.apache.cxf.frontend.ClientProxyFactoryBean.configureObject(
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(
at com.weltbild.visualrules.service.CustomerInfoProxy.<init>(
at com.weltbild.VrTestServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

Some Google-searches tended to a versioning-conflict, but we tried a lot of different versions of CXF, always getting more or less the same stacktrace. While debugging we discoverd, that it seems to be a problem of the classloader, which does not find the META_INF/cxf/cxf.extensions ressources, that leads to the NPE.

Do you have any idea ?


I agree. Here's the link:
subject: Tomcat and CXF -> NullPointerException
It's not a secret anymore!