Ehcache lucee.runtime.config.ConfigWebImpl cannot be cast

Hello,

We’ve recently upgraded from Lucee 6.2.3.35 to 6.2.6.19

Randomly, or so it appears to us, we’re getting this message when assigning a cached variable in ehcache into a local variable of a function. Once it starts, it keeps going until I clear the cache object in Lucee Administrator.

class lucee.runtime.config.ConfigWebImpl cannot be cast to class lucee.runtime.config.ConfigWebPro (lucee.runtime.config.ConfigWebImpl is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @37502ddb; lucee.runtime.config.ConfigWebPro is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @204d99ca)

Has this been found / fixed in Lucee 6.2.7.16? Possibly by LDEV-6226?

We’re running Encache 2.10.0.38

  • Eternal = 1
  • LRU
  • Time To Idle = 0
  • Time to live in seconds = 0
  • Disk persistent = 1
  • Overflow to disk = 1
  • Distribution type = off
  • Bootstrap type = on

It’s the default cache object and it’s shared by 3 sites.

Or would you need more information to take a look?

Did you restart tomcat after upgrading?

Yes. And the error persists after the restart. Only the cache clearance corrects it.

@fast.tuna sorry this one went quiet.

LDEV-6226, which you mentioned (cross-classloader identity mismatch), was fixed in 6.2.7.3, so 6.2.7.16 and later include it. I can’t say for sure it’s the same cause as your ConfigWebImpl cannot be cast to ConfigWebPro error.

Could you retest on the current 6.2 release (6.2.8.20) or the current 6.2.9.4-RC (Lucee 6.2.9.4-RC available for testing)? If it still happens, please post the full stack trace and the Ehcache extension version and we’ll take it from there.