tracker issue : CF-4204016

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

ClassCastException in Ehcache / Hibernate

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): A. B. / ()

Created: 02/11/2019

Components: Caching, Distributed Caching

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: 2018.0.01.311402 /

Priority/Frequency: Normal /

Locale/System: / Win 2016

Vote Count: 0

Problem Description: 
We have 2 ColdFusion 2018 instances, one called StudiemeterStaging2018, the other StudiereaderStaging2018. On 2 January 2019 ColdFusion wrote the following error-messages to coldfusion-out.log and hibernatesql.log of the instance StudiemeterStaging2018 (the datasource name is dsn_SM7):

01/02 17:25:54 [_ORM_StudiemeterStaging2018_dsn_SM7] ERROR Error locating Hibernate Session Factory
java.lang.ClassCastException: java.base/java.util.HashMap cannot be cast to java.base/java.util.Properties
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142)
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)

ColdFusion wrote between three and four error messages every minute from 17:25 to 23:43, when it stopped suddenly. Since then no such error messages have been written in StudiemeterStaging2018.

However, yesterday (February 10, 2019) at 11:40:01, ColdFusion suddenly started writing a similar error message to coldfusion-out.log and hibernatesql.log of the other instance, StudiereaderStaging2018:

02/10 11:40:01 [_ORM_StudiereaderStaging2018_dsn_SM7] ERROR Error locating Hibernate Session Factory
java.lang.ClassCastException: java.base/java.util.HashMap cannot be cast to java.base/java.util.Properties
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142)
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)

Steps to Reproduce:
We are as yet unable to reproduce the error. Nevertheless, we suspect that it may be caused by an inconsistency in the class ProviderMBeanRegistrationHelper.class within CF_DIR/lib/hibernate-ehcache-5.2.10.Final.jar.

1) We use distributed cache, that is, ehcache-2.10.6.jar together with terracotta-toolkit-runtime-4.3.6.jar.

 
2) ORM settings in our Application.cfc are:
this.ormSettings={
		cfcLocation: [getDirectoryFromPath(getCurrentTemplatePath()) & "nl/deviant/studiemeter/orm"],
		secondaryCacheEnabled: true,
		cacheProvider: "ehcache",
		eventHandling: true,
		logSql: false,
		searchEnabled: true,
		autoIndex: true,
		language: "Dutch"
	};

3) ehcache.xml and ProviderMBeanRegistrationHelper.java attached

Actual Result: 
The error 
02/10 11:40:01 [_ORM_StudiereaderStaging2018_dsn_SM7] ERROR Error locating Hibernate Session Factory
java.lang.ClassCastException: java.base/java.util.HashMap cannot be cast to java.base/java.util.Properties
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142)
	at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)

Expected Result:
1) No such error
2) Correction for the following line of code in ProviderMBeanRegistrationHelper.java:

 // Around line 118
Properties props = (Properties)propertiesField.get(sessionFactory);

Apparently, it fails sometimes because propertiesField.get(sessionFactory) is a Map that cannot be cast to Properties.

Any Workarounds:
None known.

Attachments:

Comments:

A better alternative to the line of code is perhaps: Properties props = new Properties(); props.putAll(propertiesField.get(sessionFactory));
Comment by A. B.
30227 | February 12, 2019 08:41:06 AM GMT
A.Bakig, The details you have provided are about the workflow in the java libraries used in hibernate/caching. Can you share the full exception stack trace for the error that indicate the CFML code where the error is originating. Can you pls share the relevant CFML code as well, if that is feasible . Did you replace the ehcache jar(2.10.3) bundled with CF with the newer version (ehcache-2.10.6). Any changes in your config or environment which lead to the errors?
Comment by Piyush K.
30457 | March 08, 2019 01:05:50 PM GMT
Hi Piyush K., Thank you for looking into this. Sorry, I am unable to share the exception stack trace. That is because our ColdFusion servers have since been updated and the log files deleted. Nevertheless, I am able to share the following information. This error occurred at the server level and didn't involve any particular code. We did replace ColdFusion's ehcache with ehcache-2.10.6.jar in the lib directory. We also made use of terracotta-toolkit-runtime-4.3.6.jar. This JAR was placed in a directory which was added to the classpath by means of the following settings: this.appRoot=getDirectoryFromPath(getCurrentTemplatePath()); this.javaSettings={ loadPaths: [this.appRoot & "../java/runtime/"], loadColdFusionClassPath: true, reloadOnChange: true, watchExtensions: "jar,class" };
Comment by A. B.
30462 | March 11, 2019 11:02:09 AM GMT
Coincidentally, the error has returned to one of our test serviers. It started suddenly at 07:26:28 yesterday, and has continued since. As a result, ColdFusion continually writes to coldfusion-out.log and hibernatesql.log at a rate of 2 error-messages per second. No error-messages are written to the other log files (application.log, coldfusion-error.log, exception.log). Here is an excerpt from coldfusion-out.log: 03/11 07:26:28 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:29 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:29 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:30 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:30 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:31 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:31 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:32 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:32 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:33 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:33 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:34 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:34 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 07:26:35 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) Mar 11, 2019 07:26:35 AM Error [ajp-nio-8022-exec-9] - Error when trying to autoregister the application. 03/11 07:26:35 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) ... ... ... 03/11 08:09:07 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 08:09:07 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 08:09:08 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 08:09:08 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap') at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:142) at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:101) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 03/11 08:09:09 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:09 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:10 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:10 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:11 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:11 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:12 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:12 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:13 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:13 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:14 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:14 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:15 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException 03/11 08:09:15 [_ORM_StudiereaderStaging2018_dsn_studiemeter7] ERROR Error locating Hibernate Session Factory java.lang.ClassCastException ... ... ... The error stopped when I restarted the ColdFusion instance a moment ago.
Comment by A. B.
30482 | March 12, 2019 12:10:43 PM GMT
That's interesting. Normally that would be a detailed stack trace in the exception log file for errors that are logged in coldfusion-error.log. Any particular reason for changing the ehcache jar. Is the error still logged if you reinstate the original jar version. Can you outline the steps that you followed to integrate terracotta with CF. Is there anything more that is required besides what you mentioned in your penultimate comment. Anything that could help me with replicating a minimal version of your application w/ your custom caching solution at my end,
Comment by Piyush K.
30495 | March 13, 2019 05:11:35 PM GMT
Thank you, Piyush K.. I should like to inform you that no error message is written to coldfusion-error.log. As I said earlier, ColdFusion writes the error messages to coldfusion-out.log and hibernatesql.log at a rate of 2 to 4 error-messages per second. No messages are written to the other log files (application.log, coldfusion-error.log, exception.log). We changed from ColdFusion's ehcache to the newer version, 2.10.6, because ehcache-2.10.6 resolves some important issues, namely [EHC-1142] - localHeapRemoveCount in StaticticsGateway is pointing to localOffHeapRemove count operation [EHC-1152] - Missing net.sf.ehcache:ehcache-parent:2.21 artifact in maven central [EHC-1153] - Drop Java 6 and 7 support in order to fix a security issue See the change-log at https://jira.terracotta.org/jira/browse/EHC/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel We did update other related JARs accordingly. It is therefore not a worthwhile test to reinstate the original JAR. The steps we followed to integrate Terracotta are: 1) Stop ColdFusion 2018; 2) In ColdFusion's lib directory, replace the ehcache JAR with the latest version, which is ehcache-2.10.6.jar; 3) Copy terracotta-toolkit-runtime-4.3.6.jar to ColdFusion's lib directory; 4) Ensure that these versions of the following files are present in ColdFusion's lib directory: log4j-1.2.17.jar, saaj-impl-1.5.1.jar, slf4j-api-1.7.25.jar, slf4j-log4j12-1.7.25; 5) In /lib/ehcache.xml, add the following subelement to <ehcache></ehcache>: <!-- terracotta sockets --> <terracottaConfig url="10.233.92.204:9510,10.233.92.205:9510"/> 6) Modify each of the application's caches so that it includes the Terracotta cluster setting. For example, <cache name="appStats" maxElementsInMemory="2000" eternal="false" timeToIdleSeconds="86400" timeToLiveSeconds="86400" overflowToDisk="false" copyOnRead="true" diskSpoolBufferSizeMB="30" maxEntriesInCache="10000000" diskExpiryThreadIntervalSeconds="3600" memoryStoreEvictionPolicy="LRU" clearOnFlush="true" statistics="true"> <terracotta clustered="true" consistency="strong" /> </cache> A. Bakia
Comment by A. B.
30528 | March 18, 2019 02:06:47 PM GMT
The error reported here has actually been around for years!
Comment by A. B.
30529 | March 18, 2019 02:56:55 PM GMT
See for example, https://hibernate.atlassian.net/browse/HHH-7562
Comment by A. B.
30530 | March 18, 2019 02:57:34 PM GMT
The Java file I mentioned in the description (ProviderMBeanRegistrationHelper.java) is in the ColdFusion file, /lib/hibernate-ehcache-5.2.10.Final.jar. The application I used to decompile the classes in the JAR is JD-GUI (http://java-decompiler.github.io/)
Comment by A. B.
30531 | March 18, 2019 04:33:15 PM GMT
For a similar error in ColdFusion 2018, see: https://helpx.adobe.com/coldfusion/kb/bugs-fixed-coldfusion-2018-update-2.html You will find the following information there: "If there is an error, as shown below, with fonts in cfdocument, you must install the respective fonts in your system before executing the tag. coldfusion.document.spi.DocumentExportException: java.lang.ClassCastException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont (sun.font.CompositeFont and sun.font.PhysicalFont are in module java.desktop of loader 'bootstrap') The issue occurs because the Lucida Font has been removed from Oracle JDK. Oracle JDK no longer ships any fonts and relies entirely on fonts installed on the Operating System"
Comment by A. B.
30997 | July 08, 2019 07:43:49 AM GMT
Update: we have discovered a pattern. Our ColdFusion instances are configured with applicationTimeout of 1 day. We observe that this bug occurs exclusively on an instance that has been idle for 1 day or longer. That is, on an instance in which the application has timed out. Subsequently the very first request to the application usually produces the bug.
Comment by A. B.
31100 | August 04, 2019 09:41:09 PM GMT