NoClassDefFoundError for jar dependencies

Hi

So I have been working on implementing this Java Library in a component. This has mostly gone flawlessly untill it wanned to call this Dependency.

I added the jar to /WEB-INF/lucee/lib like I did with the library but I still get a 500 saying io/nayuki/qrcodegen/QrCode$Ecc could not be found.

I’ve got it working before by moving the io directory from the qrcodegen.jar into the root of qrbill-generator.jar, but this does not seem like a satisfying, long-term solution.

Ive already looked at a Topic here that seemed to describe a similar issue but non of the suggestions helped.

Here is my component + my test: qrBill.zip (2.4 KB)

and here is the list of jar’s in /WEB-INF/lucee/lib:

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          03/12/2024    13:25         538940 qrbill-generator-3.3.1.jar
-a---          03/12/2024    13:17          38526 qrcodegen-1.8.0.jar

OS: windows
Tomcat Version: 9062
Lucee Version: 5.4.6.9

The way we got around a lot of these types of issues is putting the jars in the lucee directory, i.e. where the lucee.jar file is.

So we run Lucee via the Tomcat docker image.

We place the lucee.jar file in /usr/local/tomcat/lucee/ and then just place our custom jar files in there and we haven’t really had an issue since.

I already tried putting the jar files into C:\lucee\lib, this is where the lucee.jar exists in the windows install.

However, this did not work…

I will muck around with this, but is this a lucee install or an express install’?

I ask as I read something similar last year and the fix was placing the lib in both lucee/install/path/lib and /WEB-INF/LIB and then restarting the server.

a lucee install