dswitzer03/15/2022, 12:41 PM
into a folder that is loaded by the JVM via the classpath. I can run
and Lucee will load the JAR.
Now I have another JAR (let's call it Example.jar) being loaded via
and I have the
property set to
. I can call
to load classes in Example.jar and it an instance of a class is created.
However, the Example.jar is not able to see the
classes. Any attempts to initiate classes that rely on the Log4j v1 return a huge stacktrace, the root appears to be with a class loader issue:
If I move Example.jar into the same folder as
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
... 137 more
then everything works as expected. However, I'm trying to keep Example.jar in a path loaded by
because it's updated frequently and I want to be able to dynamically reload the JAR.
Why would using Lucee's JavaLoader prevent the class from being found? Should this be working? Am I misunderstanding something?
Matt Jones03/15/2022, 2:12 PM
dswitzer03/15/2022, 2:26 PM
bdw429s03/15/2022, 7:20 PM
into a folder that is loaded by the JVM via the classpath@dswitzer Which folder specifically?
log in Lucee down to trace (I forget whether you want the server or web context, so try both I guess) and that will add a bunch of logger information for what class loaders are being used.
dswitzer03/15/2022, 8:22 PM
, as it's the only reliable way I could find to resolve the issue across platforms.
What's weird is if I would add the path to the Log4j jar to createObject() call, it would complain because it was finding multiple versions of the same interface.