Current I'm in the midst of a puzzler. I have an image processing routine set up to run as a scheduled task. When the .cfm page is initiated from a web browser the page complete just fine. However, when the page is started as part of a scheduled tasks it creates errors in the log file stating there has been java.lang.NullPointerException.
Looking at the error log and doing some investigating signs point to an ExpandPath() statement causing the problem (and yes, blah is always more than two characters - again, it'll run just fine through the same data from the URL as it errors on when run as a scheduled task): <cfset myDir = ExpandPath('/images/subDir/#left(blah,2)#/#blah#/') /> The full exception entry is below. Has anyone seen this before and, more importantly, have an idea on how to fix it (other than hard coding path values to the variable)? "Error","jrpp-444","10/20/09","00:21:28","myapp","'' The specific sequence of files included or processed is: D:\mysite\public\sandbox\myfile.cfm, line: 149 " java.lang.NullPointerException at coldfusion.runtime.ServletContextWrapper.doGetRealPath(ServletContextWrapper.java:162) at coldfusion.runtime.ServletContextWrapper._doGetRealPath(ServletContextWrapper.java:112) at coldfusion.runtime.ServletContextWrapper.getRealPath(ServletContextWrapper.java:97) at coldfusion.filter.FusionContext.getRealPath(FusionContext.java:800) at coldfusion.util.Utils.expandPath(Utils.java:419) at coldfusion.runtime.CFPage.ExpandPath(CFPage.java:2819) at cffilepull_images2ecfm1549189413._factor5(D:\mysite\public\sandbox\myfile.cfm:149) at cffilepull_images2ecfm1549189413._factor7(D:\mysite\public\sandbox\myfile.cfm:143) at cffilepull_images2ecfm1549189413._factor8(D:\mysite\public\sandbox\myfile.cfm:114) at cffilepull_images2ecfm1549189413.runPage(D:\mysite\public\sandbox\myfile.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) 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.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327506 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4