Got any ideas for methodically figuring out why a ...
# lucee
j
Got any ideas for methodically figuring out why a Java class can't be initialized? I build a Jar that I then consume with Lucee. The latest version of it (with dependency updates to get rid of CVEs) has issues when called with Lucee.
lucee.runtime.exp.CustomTypeException: The incoming function DID throw an exception of type [java.lang.NoClassDefFoundError] with message [Could not initialize class my.package.pdfgen.PdfGenerator] detail []
That message doesn't give me much to go on.
d
I'm probably not going to be much help, but is your JAR OSGi compliant? Also, how are loading the JAR? Have you tried restarting the Lucee instance?
j
I don't know that OSGI-compliance matters for this kind of loading, but I could be wrong about that.
Copy code
pdfGenerator = createObject(
  type = "java",
  classname = "my.package.pdfgen.PdfGenerator",
  context = "/app/lib/iec-pdf-generator"
);
This is in a docker context, so the container gets created from scratch each time.