Redis Extension v2.9.0.10 does not work with Lucee 5.4.x

Description

The Redis extension version 2.9.0.10, which is required to use Lucee with Redis Sentinel, does not work with Lucee 5.4.x. I believe this is related to an update to org.apache.commons.commons-pool2 in the 5.4.x version. The following error message is given in the browser when trying both use a Redis cache or install the 2.9.0.10 version of the extension via the Lucee Admin:

In the OSGi Bundle with the name [redis.extension] and the version [2.9.0.10] was no class with name [lucee.extension.io.cache.redis.simple.RedisCache] found. lucee.extension.io.cache.redis.simple.RedisCache

and the following error message appears in the logs:

"ERROR","main","08/15/2023","16:47:52","deploy-extension","Uses constraint violation. Unable to resolve resource redis.extension [redis.extension [61](R 61.0)] because it is exposed to package 'org.apache.commons.pool2' from resources org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] and org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] via two dependency chains. Chain 1: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=org.apache.commons.pool2)(bundle-version>=2.4.1)) | provide: osgi.wiring.bundle: org.apache.commons.pool2 org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] Chain 2: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0)) | provide: [redis.clients.jedis [62](R 62.0)] osgi.wiring.bundle; {bundle-version=2.9.0, osgi.wiring.bundle=redis.clients.jedis} redis.clients.jedis [redis.clients.jedis [62](R 62.0)] import: (&(osgi.wiring.package=org.apache.commons.pool2)(version>=2.4.0)(!(version>=3.0.0))) | export: osgi.wiring.package: org.apache.commons.pool2 org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] Unresolved requirements: [[redis.extension [61](R 61.0)] osgi.wiring.bundle; (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0))];lucee.runtime.exp.NativeException: Uses constraint violation. Unable to resolve resource redis.extension [redis.extension [61](R 61.0)] because it is exposed to package 'org.apache.commons.pool2' from resources org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] and org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] via two dependency chains. Chain 1: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=org.apache.commons.pool2)(bundle-version>=2.4.1)) | provide: osgi.wiring.bundle: org.apache.commons.pool2 org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] Chain 2: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0)) | provide: [redis.clients.jedis [62](R 62.0)] osgi.wiring.bundle; {bundle-version=2.9.0, osgi.wiring.bundle=redis.clients.jedis} redis.clients.jedis [redis.clients.jedis [62](R 62.0)] import: (&(osgi.wiring.package=org.apache.commons.pool2)(version>=2.4.0)(!(version>=3.0.0))) | export: osgi.wiring.package: org.apache.commons.pool2 org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] Unresolved requirements: [[redis.extension [61](R 61.0)] osgi.wiring.bundle; (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398) at org.apache.felix.framework.Felix.startBundle(Felix.java:2308) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992) at lucee.loader.osgi.BundleUtil.start(BundleUtil.java:112) at lucee.loader.osgi.BundleUtil.start(BundleUtil.java:108) at lucee.runtime.osgi.OSGiUtil._start(OSGiUtil.java:1291) at lucee.runtime.osgi.OSGiUtil._startIfNecessary(OSGiUtil.java:1244) at lucee.runtime.osgi.OSGiUtil.startIfNecessary(OSGiUtil.java:1239) at lucee.runtime.osgi.OSGiUtil._loadBundle(OSGiUtil.java:616) at lucee.runtime.osgi.OSGiUtil._loadBundle(OSGiUtil.java:556) at lucee.runtime.osgi.OSGiUtil.loadBundle(OSGiUtil.java:547) at lucee.commons.lang.ClassUtil.loadClassByBundle(ClassUtil.java:163) at lucee.transformer.library.ClassDefinitionImpl.getClazz(ClassDefinitionImpl.java:117) at lucee.runtime.config.XMLConfigAdmin.setClass(XMLConfigAdmin.java:6862) at lucee.runtime.config.XMLConfigAdmin._updateCache(XMLConfigAdmin.java:4395) at lucee.runtime.config.XMLConfigAdmin.updateRHExtension(XMLConfigAdmin.java:5028) at lucee.runtime.config.XMLConfigAdmin.updateRHExtension(XMLConfigAdmin.java:4843) at lucee.runtime.config.XMLConfigAdmin._updateRHExtension(XMLConfigAdmin.java:4825) at lucee.runtime.config.DeployHandler.deployExtension(DeployHandler.java:361) at lucee.runtime.config.DeployHandler.deployExtensions(DeployHandler.java:168) at lucee.runtime.engine.CFMLEngineImpl.<init>(CFMLEngineImpl.java:372) at lucee.runtime.engine.CFMLEngineImpl.getInstance(CFMLEngineImpl.java:750) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at lucee.loader.engine.CFMLEngineFactory.getEngine(CFMLEngineFactory.java:1471) at lucee.loader.engine.CFMLEngineFactory._getCore(CFMLEngineFactory.java:583) at lucee.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:370) at lucee.loader.engine.CFMLEngineFactory.initEngineIfNecessary(CFMLEngineFactory.java:262) at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:168) at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:202) at lucee.loader.servlet.LuceeServlet.init(LuceeServlet.java:42) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117) at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:309) at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:588) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601) at runwar.Server.createServletDeployment(Server.java:1350) at runwar.Server.startServer(Server.java:517) at runwar.Start.main(Start.java:51) Caused by: org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve resource redis.extension [redis.extension [61](R 61.0)] because it is exposed to package 'org.apache.commons.pool2' from resources org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] and org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] via two dependency chains. Chain 1: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=org.apache.commons.pool2)(bundle-version>=2.4.1)) | provide: osgi.wiring.bundle: org.apache.commons.pool2 org.apache.commons.pool2 [org.apache.commons.pool2 [65](R 65.0)] Chain 2: redis.extension [redis.extension [61](R 61.0)] require: (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0)) | provide: [redis.clients.jedis [62](R 62.0)] osgi.wiring.bundle; {bundle-version=2.9.0, osgi.wiring.bundle=redis.clients.jedis} redis.clients.jedis [redis.clients.jedis [62](R 62.0)] import: (&(osgi.wiring.package=org.apache.commons.pool2)(version>=2.4.0)(!(version>=3.0.0))) | export: osgi.wiring.package: org.apache.commons.pool2 org.apache.commons.commons-pool2 [org.apache.commons.commons-pool2 [53](R 53.0)] Unresolved requirements: [[redis.extension [61](R 61.0)] osgi.wiring.bundle; (&(osgi.wiring.bundle=redis.clients.jedis)(bundle-version>=2.9.0))] ... 46 more

So can either the above be fixed so we can upgrade from 5.3.x to 5.4.x or can https://luceeserver.atlassian.net/browse/LDEV-4579 be implemented so we can move to the latest version of the Redis extension and upgrade to 5.4.x.

Environment

None

Attachments

2
  • 16 Aug 2023, 07:25 am
  • 16 Aug 2023, 07:25 am

Activity

Show:

Pothys - MitrahSoft 25 June 2024 at 14:58

I checked this ticket in Redis extension version 2.9.1.0-SNAPSHOT. When installing the latest Redis version, it installed successfully and worked fine.

Michael Offner 25 June 2024 at 12:52

please give this new version of the extension a try

Michael Offner 25 June 2024 at 12:50

this issue happens because never versions of the OSGi engine Felix is more restrictive with the environment.

I have created a snapshot for 2.9 with the fix https://ext.lucee.org/redis.extension-2.9.1.0-SNAPSHOT.lex

Pothys - MitrahSoft 12 June 2024 at 10:43

I checked this ticket and it is still a issue with Lucee version 6.1.0.192-SNAPSHOT.

Andrew Dixon 16 August 2023 at 07:40

- Yes, 3.0.0.48 installs and works ok, but unfortunately, as mentioned in the initial ticket, v3.x does not support Redis Sentinel. so we are unable to use v3.x.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 15 August 2023 at 15:06
Updated 25 June 2024 at 14:58
Resolved 25 June 2024 at 14:58

Flag notifications