tracker issue : CF-3195198

select a category, or use search below
(searches all categories and all time range)
Title:

<cfdirectory action="list" recurse="yes" throws NullPointer upon encountering an inaccessible directory

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 05/21/2012

Components: File Management

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 282921

Priority/Frequency: Normal / Very few users will encounter

Locale/System: English / Win All

Vote Count: 1

Currently, cfdirectory throws a java.lang.NullPointerException when it encounters an inaccessible directory during a recursive list action.

Rather than throw that exception, it should skip the recursion attempt for those dirs.

Repro:
1) just create a child folder and remove all permissions from it
2) do <cfdirectory action="list" recurse="yes".. /> for the parent directory
3) see exception:

-----------
    java.lang.NullPointerException said:The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

    Null Pointers are another name for undefined values.

    java.lang.NullPointerException
-----------

As mentioned by Michael Dawson, cfdirectory should return the directory, but should show some indicator that it was not accessible.

My suggestion: Maybe it could set an attribute like "I" for "I"naccessible.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3195198

Keywords:
FixTested


External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

Related thread: http://prerelease.adobe.com/r/?61cad81be06b4313b587c15072ecbb9e
Comment by External U.
19314 | May 21, 2012 07:55:43 PM GMT
Here is the stack trace: java.lang.NullPointerException at coldfusion.tagext.io.FileUtils.recursiveGetFiles(FileUtils.java:283) at coldfusion.tagext.io.FileUtils.recursiveGetFiles(FileUtils.java:299) at coldfusion.tagext.io.FileUtils.listFiles(FileUtils.java:255) at coldfusion.tagext.io.FileUtils.listFiles(FileUtils.java:232) at coldfusion.tagext.io.DirectoryTag.doStartTag(DirectoryTag.java:291) at cfindex2ecfm605669315.runPage(N:\websites\BoltTest\www\tests\cfdirectory\index.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:422) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:204) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) 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:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:203) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Comment by External U.
19315 | May 21, 2012 08:47:18 PM GMT
This can be reproduced easily on Windows Vista, Windows 7, and Windows Server 2008 simply by running this code: <cfdirectory action="list" directory="c:" recurse="yes" filter="Application.cfc" name="myVar" /> It will throw an exception when it reaches c:\ProgramData
Comment by External U.
19316 | May 21, 2012 09:13:18 PM GMT
Yeah, ought to be fixed. -- Adam
Vote by External U.
19318 | May 22, 2012 02:32:02 AM GMT
It does not throw exception now.
Comment by Akhila K.
19317 | October 09, 2012 01:00:58 AM GMT