1

Whenever I display a JFileChooser dialog I get the following error message appearing on stderr:

log4cplus:ERROR No appenders could be found for logger (AdSyncNamespace).
log4cplus:ERROR Please initialize the log4cplus system properly.

The error message is produced in UCS-2 despite my regular output being in UTF-8. How do I get rid of this error?

I'm using JDK 1.7.0_21 on Windows 7 Ultimate 64-bit.

Jules
  • 14,841
  • 9
  • 83
  • 130
  • It appears that one of your debug/log tools, log4cplus, is not adequate to work with Java. – DSquare Feb 18 '14 at 18:06
  • I'm not using any such tool. This is just a standard pure-Java program using Swing. – Jules Feb 18 '14 at 20:19
  • @Jules `log4cplus` is for C++. `log4j` is for Java – An SO User Feb 18 '14 at 20:27
  • I'm aware of this. I presume the native portion of Swing is therefore implemented in C++? – Jules Feb 19 '14 at 21:28
  • n.b. I just noticed this is a duplicate of the unanswered question http://stackoverflow.com/questions/18091407/jfilechooser-causes-log4cpluserror-no-appenders-could-be-found-for-logger-adsy – Jules Feb 21 '14 at 07:07
  • possible duplicate of [log4cplus:ERROR in python when calling for tkinter file dialog](http://stackoverflow.com/questions/19576586/log4cpluserror-in-python-when-calling-for-tkinter-file-dialog) – wilx Feb 25 '14 at 22:49
  • I agree that the error message is the same there, which may indicate the same root cause (although how the same problem can happen in both python and java code is an intriguing question that I don't have a good answer to), but I don't accept "uninstall autodesk 360" as a suitable answer to this question. There must be a reason it's interacting with my program, and a way I can avoid it without uninstalling it. – Jules Feb 26 '14 at 10:03
  • 1
    Also note that the way to avoid it may be different between a python and java program, therefore I don't think closing as a duplicate is a sensible idea. – Jules Feb 26 '14 at 10:09

1 Answers1

0

Depending on the log4cplus version, you might be able to turn off these messages by defining global environment variable LOG4CPLUS_LOGLOG_QUIETMODE to 1.

wilx
  • 17,697
  • 6
  • 59
  • 114