New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.ExceptionInInitializerError (org.apache.commons.logging.LogConfigurationException: No suitable Log constructor) #3641
Comments
This looks like you have a commons-logging.jar somewere in your system classpath. |
Thanks for the prompt response. I tried unsetting CLASSPATH but to no avail: $ unset CLASSPATH I've also tried to find commons-logging.jar but to no avail: $ locate commons-logging.jar Would this not imply that I don't have a commons-logging.jar? I'm no Java guru but it says: NoClassDefFoundError. |
Replying to [comment:2 samj]:
From what I know there must be a commons-logging.jar in the system classpath loaded by the parent classloader. But log4j and commons-logging must be loaded by the same application class loader. |
Ok I'll see what I can find. BTW I'd make a donation but my PayPal account was just suspended because I accessed it from my iPhone!?!?! Will be in Zürich on and off from next month so maybe I can buy you a beer or something... Sam |
Replying to [comment:4 samj]:
You could probably find out by looking at Open Files in Activity Monitor.app → View → Inspect Process. Do you plan to visit Bern? |
Will have a rail pass so yeah, why not? Reinstalled Snow Leopard from scratch so things are (or at least were) working again. Sam |
OK so the problem was that I had commons-logging-1.0.4.jar in /Library/Java/Extensions. Removing it allows Cyberduck to start but breaks other Java applications on my system. I did find however that downloading log4j from http://logging.apache.org/log4j/1.2/index.html and installing both commons-logging-1.0.4.jar and log4j-1.2.15.jar into /Library/Java/Extensions. That is to say it appears to be ok if you have commons-logging in your Java path provided you also have log4j? Note that it's a difficult problem to diagnose - initially Cyberduck would just crash on launch but then more recent versions I could see e.g. Amazon S3 connections but attempts to open them were silently ignored (unless I opened a terminal, ran /Applications/Cyberduck.app/Contents/MacOS/Cyberduck directly and watched for the errors on the command line. As I said, not a Java guru but I do wonder whether this condition couldn't be better handled (e.g. with a sensible error?). |
Replying to [comment:8 samj]:
Thanks for your anlysis on this. Commons-Logging is known for its problems with different classloaders and its dynamic lookup of log implementations. It might act differently if you place a newer version of commons-logging jar into the Extensions directory.
Yes, we would need to catch these runtime exceptions which we currently do not as they are usually recoverable from. |
After a long time with CyberDuck crashing on launch version 3.2.1 (4923) finally starts but fails to connect apparently due to a Log4J error. The log below appears when I try to connect to e.g. S3 after starting Cyberduck from the command line:
The text was updated successfully, but these errors were encountered: