tracker issue : CF-3583147

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

Issue with ORMREload() and Secondary Cache

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Scott Stroz / Scott Stroz (Scott Stroz)

Created: 06/21/2013

Components: ORM Support

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final / 285347

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win All

Vote Count: 0

Problem Description: When secondary cache is enabled, and there are objects in the cache, and a request is made that triggers a call to ormReload() and before that request is completed, another request is made from another browser window to the site, CF will throw an error that 'Another CacheManager' with the same name exists' error

Steps to Reproduce:

1. Set up an application to use ORM with secondaryCache enabled.
2. Make sure you trigger a process that would put objects into cache.
3. Open another browser window and browse to any page in the site.
4. In the first browser window, make a request that will trigger a call to ormReload().
5. Before the previous request is complete, refresh the page in the second browser window.
6. You should receive a error message in both browser windows: 
 	Another CacheManager with same name '_ORM_{application name}' already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following: 1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary 2. Shutdown the earlier cacheManager before creating new one with same name. The source of the existing CacheManager is: URLConfigurationSource [url=jar:file:/C:/ColdFusion10/cfusion/lib/ehcache-core-2.5.1.jar!/ehcache-failsafe.xml] 


Actual Result:
You get the error noted above

Expected Result:
You should not get an error

Any Workarounds: None that I know of.

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

Watson Bug ID:	3583147

External Customer Info:
External Company:  
External Customer Name: Scott Stroz
External Customer Email:  
External Test Config: My Hardware and Environment details:



Windows 7 (also happens on Windows Server 2008 R2 Datacenter)

SQL Server 2008

ColdFsuion 10

Attachments:

Comments:

Tested this using the Test Case: cfsuite/orm/cachingfx/functions/ormevictcollection/test_bag.cfm There is an statement ormreload() in this test case Keep refreshing the .cfm page: above error is thrown in CF10 After taking update: Keep refreshing the .cfm page: and the below exception is thrown: java.lang.NullPointerException at coldfusion.orm.hibernate.CFCTuplizer$CFCinstantiator.instantiate(CFCTuplizer.java:246) at coldfusion.orm.hibernate.CFCTuplizer$CFCinstantiator.instantiate(CFCTuplizer.java:227) at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:606) at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:3888) at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1412) at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1401) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1342) at org.hibernate.loader.Loader.getRow(Loader.java:1251) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619) at org.hibernate.loader.Loader.doQuery(Loader.java:745) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.loadEntity(Loader.java:1933) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at coldfusion.orm.hibernate.SessionWrapper.get(SessionWrapper.java:203) at coldfusion.orm.hibernate.HibernatePersistenceManager.loadByPK(HibernatePersistenceManager.java:200) at coldfusion.orm.ORMUtils.entityLoadByPK(ORMUtils.java:75) at coldfusion.orm.ORMUtils._entityLoad(ORMUtils.java:144) at coldfusion.orm.ORMUtils.entityLoad(ORMUtils.java:113) at coldfusion.runtime.CFPage.EntityLoad(CFPage.java:8849) at cftest_bag2ecfm235013784.runPage(C:\ColdFusion10\cfusion\wwwroot\cfsuite\orm\cachingfx\functions\ormevictcollection\test_bag.cfm:40) 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:428) 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:219) 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.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) 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 added from ex-user id:nawani)
Comment by Adobe D.
15153 | June 28, 2013 08:22:15 AM GMT
In this case, we are calling ormreload() for each request, so it might not be the valid case. I will test this with a valid case and will update the status later. (Comment added from ex-user id:nawani)
Comment by Adobe D.
15154 | June 28, 2013 08:31:15 AM GMT
The described error "Another CacheManager' with the same name exists" is not shown. (Comment added from ex-user id:nawani)
Comment by Adobe D.
15155 | July 08, 2013 02:29:32 AM GMT