Third part java class issues after upgrade from 4.5 to 5.3


I have recently migrated a site from a Lucee 4.5 to Lucee 5.3 server. (On windows, Tomcat 9, Java 11)
I am having trouble with using third party jar files, it was working fine, and all the same jar files are in the folder: \WEB-INF\lucee\lib

I’ll use the azure storage library for example, but this happens with a couple of different libraries.
When I load an object from a package such as:

<cfset LOCAL.CloudStorageAccount = CreateObject("java","" ).parse(variables.connectionString)>

I will get a java.lang.NoClassDefFoundError for one of the other classes in the package that this command would use. In this example it is:

Could not initialize class

Lucee is obviously finding the package, or CreateObject(“java”,“” ) wouldn’t work.

And I can look in the jar, and see that is inside the package.

I have tried both the original jar files from the old server, and the latest version of the package downloaded from maven, but the result is the same.

Can anyone think of what I might be doing wrong or what might be happening?



Ok, I solved this myself, well, at least found a work around for anyone struggling like me.

If I explicitly specify all the dependent packages in the createObject, it works:


<cfset **variables.classpathstest**=

<cfset LOCAL.CloudStorageAccount = CreateObject("java","",**variables.classpathstest**).parse(variables.connectionString)>
1 Like

Ok, I thought this had worked, but after restarting TomCat, I am back to it not working again, with the same error.

The jar files were not changed or moved between it working and not working, just the restart of TomCat

Anyone got any other thoughts?

using java 11? try java 1.8

Same with 1.8.0_222

there was a similar issue with Lucee docs

Certainly sounds familiar, but I have double checked and i’m it still happens on Java 1.8, I have also checked: Info - Bundle (jar) page in web administrator and all dependent packages are listed as loaded and active.