Yea, this kind of looks like a bug in jboss or something. It seems to be
allowing the JVM to shutdown while requests are still in flight or similar
which could result in all kinds of warnings and errors and such.
That line is literally:
public static void setThreadDefaultBus(Bus bus) {
localBus.set(bus);
}
and localBus is just:
protected static ThreadLocal<Bus> localBus = new ThreadLocal<Bus>();
and thus couldn't be null in any normal case.
Dan
On Thursday 18 September 2008 10:20:17 am Brad wrote:
> Hi all,
>
> We have seen this in our logs a couple times after the JVM has been shut
> down:
>
> 2008-09-15 11:45:57,468 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test].[CX
>FServlet]](TP-Processor7) Servlet.service() for servlet CXFServlet threw
> exception
> java.lang.NullPointerException
> at org.apache.cxf.BusFactory.setThreadDefaultBus(BusFactory.java:90)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl
>et.java:176) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServle
>t.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>
> Could this be down to our configuration?
>
> Cheers,
> Brad.
>
> PS here's our cxf.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:foo="http://cxf.apache.org/configuration/foo"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
> <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
> <bean class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor"
> id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor"/>
> <bean class="org.apache.cxf.bus.spring.BusExtensionPostProcessor"
> id="org.apache.cxf.bus.spring.BusExtensionPostProcessor"/>
>
> <bean id="org.apache.cxf.resource.ResourceManager"
> class="org.apache.cxf.bus.resource.ResourceManagerImpl">
> <constructor-arg>
> <list>
> <bean class="org.apache.cxf.resource.ClasspathResolver"/>
> <bean class="org.apache.cxf.resource.ClassLoaderResolver"/>
> <bean
> class="org.apache.cxf.bus.spring.BusApplicationContextResourceResolver"/>
> </list>
> </constructor-arg>
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.configuration.Configurer"
> class="org.apache.cxf.configuration.spring.ConfigurerImpl">
> </bean>
>
> <bean id="org.apache.cxf.binding.BindingFactoryManager"
> class="org.apache.cxf.binding.BindingFactoryManagerImpl">
> <constructor-arg>
> <bean
> class="org.apache.cxf.configuration.spring.SpringBeanMap"> <property
> name="type"
> value="org.apache.cxf.binding.BindingFactory"/>
> <property name="idsProperty" value="activationNamespaces"/>
> </bean>
> </constructor-arg>
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.transport.DestinationFactoryManager"
> class="org.apache.cxf.transport.DestinationFactoryManagerImpl">
> <constructor-arg>
> <bean
> class="org.apache.cxf.configuration.spring.SpringBeanMap"> <property
> name="type"
> value="org.apache.cxf.transport.DestinationFactory"/>
> <property name="idsProperty" value="transportIds"/>
> </bean>
> </constructor-arg>
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.transport.ConduitInitiatorManager"
> class="org.apache.cxf.transport.ConduitInitiatorManagerImpl">
> <constructor-arg>
> <bean
> class="org.apache.cxf.configuration.spring.SpringBeanMap"> <property
> name="type"
> value="org.apache.cxf.transport.ConduitInitiator"/>
> <property name="idsProperty" value="transportIds"/>
> </bean>
> </constructor-arg>
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.wsdl.WSDLManager"
> class="org.apache.cxf.wsdl11.WSDLManagerImpl">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.phase.PhaseManager"
> class="org.apache.cxf.phase.PhaseManagerImpl">
>
> </bean>
>
> <bean id="org.apache.cxf.workqueue.WorkQueueManager"
> class="org.apache.cxf.workqueue.WorkQueueManagerImpl">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.buslifecycle.BusLifeCycleManager"
> class="org.apache.cxf.buslifecycle.CXFBusLifeCycleManager">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.endpoint.ServerRegistry"
> class="org.apache.cxf.endpoint.ServerRegistryImpl">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.endpoint.ServerLifeCycleManager"
> class="org.apache.cxf.endpoint.ServerLifeCycleManagerImpl"/>
> <bean id="org.apache.cxf.endpoint.ClientLifeCycleManager"
> class="org.apache.cxf.endpoint.ClientLifeCycleManagerImpl"/>
>
>
> <bean id="org.apache.cxf.transports.http.QueryHandlerRegistry"
> class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl">
> <constructor-arg ref="cxf"/>
> <constructor-arg>
> <list>
> <bean
> class="org.apache.cxf.transport.http.WSDLQueryHandler">
> <property name="bus" ref="cxf"/>
> </bean>
> </list>
> </constructor-arg>
> </bean>
>
> <bean id="org.apache.cxf.endpoint.EndpointResolverRegistry"
> class="org.apache.cxf.endpoint.EndpointResolverRegistryImpl">
> <property name="bus" ref="cxf"/>
> </bean>
> <bean id="org.apache.cxf.headers.HeaderManager"
> class="org.apache.cxf.headers.HeaderManagerImpl">
> <property name="bus" ref="cxf"/>
> </bean>
> <bean id="org.apache.cxf.catalog.OASISCatalogManager"
> class="org.apache.cxf.catalog.OASISCatalogManager">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean id="org.apache.cxf.endpoint.ServiceContractResolverRegistry"
> class="org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl">
> <property name="bus" ref="cxf"/>
> </bean>
>
> <bean
> class="org.apache.cxf.transport.servlet.ServletTransportFactory"
> id="org.apache.cxf.transport.servlet.ServletTransportFactory">
> <property name="bus" ref="cxf"/>
> <property name="transportIds">
> <set>
> <value>http://cxf.apache.org/bindings/xformat</value>
> <value>http://schemas.xmlsoap.org/soap/http</value>
> <value>http://schemas.xmlsoap.org/wsdl/http/</value>
> <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
> <value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
>
> <value>http://cxf.apache.org/transports/http/configuration</value>
> </set>
> </property>
> </bean>
>
> </beans>
--
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog