cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Borgland (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CXF-4094) Refreshing Spring application context leads to NPE
Date Thu, 16 Feb 2012 19:01:00 GMT

     [ https://issues.apache.org/jira/browse/CXF-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jens Borgland closed CXF-4094.
------------------------------


Verified in: 
2.4.7 snapshot build 20120216.070257-12 
2.5.3 snapshot build 20120216.075050-14.
                
> Refreshing Spring application context leads to NPE
> --------------------------------------------------
>
>                 Key: CXF-4094
>                 URL: https://issues.apache.org/jira/browse/CXF-4094
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>    Affects Versions: 2.4, 2.5
>            Reporter: Jens Borgland
>            Assignee: Daniel Kulp
>             Fix For: 2.4.7, 2.5.3
>
>
> I have a web application that uses Spring and CXF (currently 2.4.2 but I have reproduced
this on 2.4.6 and 2.5.2 as well) and is deployed on Tomcat.
> The application is initialized using the org.springframework.web.context.ContextLoaderListener.
> Starting and shutting the application down works like a charm but if I try to refresh
the Spring application context, using ((ConfigurableApplicationContext)applicationContext).refresh();
I run into problems. 
> The application context first destroys all its beans (including CXFBusImpl, or rather
its subclass SpringBus). SpringBus however calls ctx.close() on its application context -
leading to a NullPointerException when the application context shortly after tries to close
its bean factory:
> {code:borderStyle=solid}
> java.lang.NullPointerException 
>     at org.springframework.context.support.AbstractRefreshableApplicationContext.closeBeanFactory(AbstractRefreshableApplicationContext.java:152)

>     at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:124)

>     at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)

>     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)}}
> {code}
>  
> I think that SpringBus shouldn't call ctx.close() in destroyBeans(). I tried removing
this row and rebuilding CXF myself which fixed the problem (and I couldn't detect any other
problems starting or shutting down).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message