struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mirek Hankus (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3910) NPE in DefaultStaticContentLoader during startup
Date Wed, 31 Oct 2012 16:13:12 GMT

    [ https://issues.apache.org/jira/browse/WW-3910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487899#comment-13487899
] 

Mirek Hankus commented on WW-3910:
----------------------------------

Providing test case make take a while, because project is complex. 
Anyway, please note that

# method parse of DefaultStaticContentLoader may return null (javadoc does not say a word
about returning null
# result of parse is set to {code}this.pathPrefixes = parse(packages);{code} without checking
for null result
# rest of DefaultStaticContentLoader  assumes that this.pathPrefixes is not null

so there needs code needs some fixes:
# javadoc should state that parse may return null, or parse should always return String[]
(event empty one).
# code should check for null result  (if parse is supposed to return null)


Root cause of this problem is unknown right now. I will investigate problem. 






                
> NPE in DefaultStaticContentLoader during startup
> ------------------------------------------------
>
>                 Key: WW-3910
>                 URL: https://issues.apache.org/jira/browse/WW-3910
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.6
>            Reporter: Mirek Hankus
>
> Struts 2.3.6
> During application startup I'm getting NPE. 
> {code}
> 16:30:25,028 ERROR error500:142 - Error
> java.lang.NullPointerException
> 	at org.apache.struts2.dispatcher.DefaultStaticContentLoader.findStaticResource(DefaultStaticContentLoader.java:161)
> 	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeStaticResourceRequest(ExecuteOperations.java:62)
> 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:86)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:25)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at filters.CheckSessionFilter.doFilter(CheckSessionFilter.java:117)
> 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
> 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
> 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:722)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message