tracker issue : CF-3195198

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

<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.

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.


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


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



Related thread:
Comment by External U.
19314 | May 21, 2012 07:55:43 PM GMT
Here is the stack trace: java.lang.NullPointerException at at at at at at cfindex2ecfm605669315.runPage(N:\websites\BoltTest\www\tests\cfdirectory\index.cfm:1) at coldfusion.runtime.CfJspPage.invoke( at coldfusion.tagext.lang.IncludeTag.doStartTag( at coldfusion.filter.CfincludeFilter.invoke( at coldfusion.filter.IpFilter.invoke( at coldfusion.filter.ApplicationFilter.invoke( at coldfusion.filter.RequestMonitorFilter.invoke( at coldfusion.filter.MonitoringFilter.invoke( at coldfusion.filter.PathFilter.invoke( at coldfusion.filter.LicenseFilter.invoke( at coldfusion.filter.ExceptionFilter.invoke( at coldfusion.filter.ClientScopePersistenceFilter.invoke( at coldfusion.filter.BrowserFilter.invoke( at coldfusion.filter.NoCacheFilter.invoke( at coldfusion.filter.GlobalsFilter.invoke( at coldfusion.filter.DatasourceFilter.invoke( at coldfusion.filter.CachingFilter.invoke( at coldfusion.CfmServlet.service( at coldfusion.bootstrap.BootstrapServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at coldfusion.monitor.event.MonitoringServletFilter.doFilter( at coldfusion.bootstrap.BootstrapFilter.doFilter( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.authenticator.AuthenticatorBase.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.valves.AccessLogValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.ajp.AjpProcessor.process( at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( at$ at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at
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