tracker issue : CF-3527009

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

Caused by: java.lang.NullPointerException On CreateObject

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jork Zijlstra / Jork Zijlstra (Jork Zijlstra)

Created: 03/21/2013

Components: Language, CF Interfaces

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final / CF10_Update14

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2003 Server x64

Vote Count: 0

Problem Description:
We get an nullpointer exception on the createObject(). 

Steps to Reproduce:

We are not sure, jvm has enough memory. We think:
1) concurrency problem
2) garbage collection

Actual Result:
The problem exists in CF 8, 9 and 10

File: InterfaceTemplateProxyCache
/* 125 */         if (proxy.isParentInterfaceChanged(pageContext, parentClasses))

For some reason proxy is null.

Expected Result:
No nullpointer error. 

Any Workarounds:
Don't use interfaces (we are verifying this)

Stack trace
coldfusion.runtime.EventHandlerException: Event handler exception.
	at coldfusion.runtime.AppEventInvoker.onSessionStart(AppEventInvoker.java:377)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:301)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
	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.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:200)
	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:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.NullPointerException
	at coldfusion.runtime.InterfaceTemplateProxyCache.getTemplateProxyFromPath(InterfaceTemplateProxyCache.java:125)
	at coldfusion.runtime.TemplateProxy.verifyInterfaceImpl(TemplateProxy.java:1072)
	at coldfusion.runtime.TemplateProxy.verifyInterfacesImpl(TemplateProxy.java:880)
	at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:383)
	at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:238)
	at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:159)
	at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:149)
	at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:62)
	at coldfusion.runtime.CFPage.___createObjectInternal(CFPage.java:8577)
	at coldfusion.runtime.CFPage._createObject(CFPage.java:8564)

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

Watson Bug ID:	3527009

External Customer Info:
External Company:  
External Customer Name: Jork Zijlstra
External Customer Email:  
External Test Config: My Hardware and Environment details:



Windows server 2003

CF 10, update 8

2nd level cache enabled

Attachments:

  1. March 21, 2013 00:00:00: 1_InterfaceTemplateProxyCache.java
  2. May 06, 2014 00:00:00: 2_namingclasses.zip

Comments:

i can confirm this. Same problem here.
Comment by External U.
15927 | March 25, 2013 10:27:43 AM GMT
We are experiencing the same issues. Servers will run great and then stop resolving known good component paths on CreateObject calls. Will play with the idea of not having an interface, but that really blows.
Comment by External U.
15928 | June 28, 2013 01:30:10 PM GMT
For us not implementing interfaces resolved the issue. And it is also a performance fix, since the check if a component complies to the interface is normally checked for all requests.
Comment by External U.
15929 | February 11, 2014 04:50:50 AM GMT
We have also occasionally encountered a java.lang.NullPointerException at coldfusion.runtime.InterfaceTemplateProxyCache.getTemplateProxyFromPath(InterfaceTemplateProxyCache.java:125) in ColdFusion 10,0,12,286680. In our case it seems to have been caused by MaxPermSize being to low. The exception has not occurred since we increased the value of that setting.
Comment by External U.
15930 | May 03, 2014 06:06:15 AM GMT
We also tried giving it more memory, but it didn't help. It seemed that the garbage collector still couldn't keep up.
Comment by External U.
15931 | May 06, 2014 01:51:23 AM GMT
J_M_84 is right. This will happen if the maxpermsize is low and class object gets cleared from the template cache. This has been fixed now and the fix should be available in the next update.
Comment by Rupesh K.
15932 | May 06, 2014 04:15:25 AM GMT
I have attached the class files and stacktrace.
Comment by External U.
15933 | May 06, 2014 05:24:59 AM GMT
Sorry wrong issue
Comment by External U.
15934 | May 06, 2014 05:25:19 AM GMT