@kenny java -Done-jar.verbose=true -jar <one-jar.jar>
might be useful. Also doing jar tf one-jar.jar
will help us check what's in the jar and ensure it is including your dependency on logback 🙂
If your application is open source / you can create a repo I can run, I can do these things myself 🙂
Oh, I should mention <one-jar.jar>
just means your jar that you're running
@dominicm What should I be looking for in there? I get a ton of output.
@kenny is there a logback jar?
@dominicm Yes, in the lib directory in the jar.
@kenny hmm, okay. Which ones are there?
@kenny how are you running your jar?
Unfortunately, it is not.
logback-core and logback-classic.
java -jar command-processor-standalone.jar -m compute.command-processor.core command-processor
java -jar command-processor-standalone.jar --one-jar-version
does this work? @kenny
Can I pass a CLI arg?
I guess we will have to try get a repo, or hopefully stumble into the solution
@kenny what do you mean, sorry?
To the -main
.
Like in this command: java -jar command-processor-standalone.jar -m compute.command-processor.core command-processor
I pass the arg command-processor
.
Ah, I thought that was going to run the -main
. Yes, it works:
java -jar command-processor-standalone.jar --one-jar-version
One-JAR version 0.97-rc12-20110504-1459
I guess we start with the repl. Instead of -m, try -r? That should give you a repl
Try requiring a few of your dependencies, see if they will load?
I can require my -main
namespace.
If I try and run my -main
function, I get the java.lang.ClassNotFoundException: ch.qos.logback.core.AppenderBase
exception.
That's interesting. I guess something that's dynamically loading isn't present.
I wonder if there's a missing dependency then.
What were the names of the logback libraries you had?
It's really just this: ch.qos.logback/logback-classic {:mvn/version "1.2.3"}
.
I mean in your jar @kenny
5946D837FE6F960C02A53EDA7A6926ECC3C758BBDD69AA453EE429F858217F22-logback-core-1.2.3.jar
FB53F8539E7FCB8F093A56E138112056EC1DC809EBB020B59D8A36A5EBAC37E0-logback-classic-1.2.3.jar
I will try and create a minimal reproduction tomorrow.
Ok. Let me know if I can help.