Issues

 

java.lang.NoClassDefFoundError for redis.clients.jedis.CommandObjects when creating redis.clients.jedis.Jedis

Description

Re: Lucee forum issue 10988

jedis = createObject( "java", "redis.clients.jedis.Jedis").init()

throws:

Lucee 5.3.9.160 Error (java.lang.NoClassDefFoundError) Message Could not initialize class redis.clients.jedis.CommandObjects

Environment

Lucee 5.3.9.160 in Docker in WSL:Ubuntu-20.04 under Windows 10

Details

Assignee

Reporter

Priority

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 29 August 2022 at 11:13
Updated 29 August 2022 at 15:13

Activity

Pothys - MitrahSoft29 August 2022 at 15:12

I've checked this ticket and reproduce the issue with Jedis-4.3.0-m1.jar.

Creating an object to the class redis.clients.jedis.CommandObjects didn't throw any error. Seems it works fine in ACF.

CommandObjects = createObject("java", "redis.clients.jedis.CommandObjects");

But dumping the class or creating a constructor to this class throws an error like Could not initialize class redis.clients.jedis.CommandObjects.

CommandObjects = createObject("java", "redis.clients.jedis.CommandObjects") writeDump(CommandObjects) OR CommandObjects = createObject("java", "redis.clients.jedis.CommandObjects").init();

StackTrace

lucee.runtime.exp.NativeException: Could not initialize class redis.clients.jedis.CommandObjects at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at lucee.runtime.reflection.pairs.ConstructorInstance.invoke(ConstructorInstance.java:53) at lucee.runtime.reflection.Reflector.callConstructor(Reflector.java:1020) at lucee.runtime.java.JavaObject.init(JavaObject.java:326) at lucee.runtime.java.JavaObject.call(JavaObject.java:251) at lucee.runtime.java.JavaObject.call(JavaObject.java:287) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1769) at test.testcases.test_cfm$cf$5.call(/test/testcases/test.cfm:3) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1050)