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

Colm O hEigeartaigh updated CXF-7759:
-------------------------------------
    Fix Version/s: 3.2.6

> Null pointer from the ThreadLocalServletContext class
> -----------------------------------------------------
>
>                 Key: CXF-7759
>                 URL: https://issues.apache.org/jira/browse/CXF-7759
>             Project: CXF
>          Issue Type: Bug
>         Environment:  
> server :Unit test JEtty 9
> server: deployement in Tomcal 8
> Spring :4.2.5 Release
> Before upgrading to cxf 3.1.5 it was working smoothly without any issue.
> Currently we are using cxf 3.1.5 core library,prior to this we had been using 
> cxf-api 2.7.6
> Just for curiosity I have one question what is the difference between using 
> cxf core library and cxf-api library,I could see in both libraries many 
> places same class files are present like CXFservlet.
>            Reporter: yagnya dutta dhal
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: 3.2.6
>
>         Attachments: CXF-7759.patch
>
>
> Hi ,
> We have developed some rest services using CXF3.1.5,When I try to invoke my 
> rest service I get always NullPointerException.
> I debugged this class file somehow its not getting initialized after 
> deployment.
> In both tomcat and jetty we get same exception.below is the exception trace.
> HTTP Status 500 – Internal Server Error
> java.lang.NullPointerException 
> org.apache.cxf.jaxrs.impl.tl.ThreadLocalServletContext.getAttribute(ThreadLocalServletContext.java:46)
>  
> org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:109)
>  
> org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:98)
>  
> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:81)
>  
> com.emc.healthcare.xds.registry.commons.rest.AbstractResource.getProducerTemplate(AbstractResource.java:48)
>  
> com.emc.healthcare.xds.registry.commons.rest.AbstractResource.routeThroughCamel(AbstractResource.java:66)
>  
> com.emc.healthcare.xds.registry.commons.rest.AbstractResource.routeThroughCamel(AbstractResource.java:56)
>  
> com.emc.healthcare.xds.registry.commons.rest.SubmissionSetResource.queryForSelf(SubmissionSetResource.java:50)
>  
> com.emc.healthcare.xds.registry.commons.rest.SubmissionSetResource.getSelf(SubmissionSetResource.java:34)
>  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  java.lang.reflect.Method.invoke(Method.java:606) 
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
>  
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>  org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189) 
> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:260) 
> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:260) 
> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99) 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
>  
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
>  
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>  
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>  
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253)
>  
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
>  
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
>  
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
>  
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
>  
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298)
>  
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:635) 
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273)
>  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
>  
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
>  
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
>  
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
>  
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
>  
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
>  
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>  
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
>  
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
>  
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
>  
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>  
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
> Thanks,
> Yagnya
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to