Calling getMetaData() on a component in ColdFusion 10 seems to randomly throw an internal NullPointerException. While this exception is neither exposed nor affects the actual request (and thus is not critical to our applications itself), it still fills up the exception.log
files rapidly.
I noticed this might be related to the path caching of ColdFusion since I get these NullPointerException entries on the production server only. I also noticed that this exception is only thrown once per component where I use getMetaData() on, although not every first call seems to trigger it.
For clarification: getMetaData() works perfectly well, but it sometimes logs a NullPointerException in ColdFusion's exception.log file.
Does anyone know a solution (other than disabling the caching or the exception.log file)?
Background:
I use getMetaData() to identify components, especially useful when using <cfinterface>
.
java.lang.NullPointerException
at coldfusion.util.Utils.getServletPath(Utils.java:100)
at coldfusion.util.Utils.getServletPath(Utils.java:90)
at coldfusion.util.Utils.getBaseTemplatePath(Utils.java:419)
at coldfusion.runtime.TemplateProxyFactory.getTemplateFileHelper(TemplateProxyFactory.java:1567)
at coldfusion.runtime.MetadataUtils.getComponentMetadata(MetadataUtils.java:112)
at coldfusion.runtime.CfJspPage.GetComponentMetadata(CfJspPage.java:2744)
at coldfusion.runtime.TemplateProxy.getRuntimeComponentMetadata(TemplateProxy.java:1940)
at coldfusion.runtime.TemplateProxy.getRuntimeMetadata(TemplateProxy.java:1801)
at coldfusion.runtime.MetadataUtils.getMetaData(MetadataUtils.java:54)
at coldfusion.runtime.CfJspPage.GetMetadata(CfJspPage.java:2717)