[ https://issues.apache.org/jira/browse/CASSANDRA-2383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055792#comment-13055792 ]
David Allsopp edited comment on CASSANDRA-2383 at 6/27/11 10:13 PM: -------------------------------------------------------------------- @Jonathan - yes, I thought so too, but it doesn't. The default init process for log4j is described at http://logging.apache.org/log4j/1.2/manual.html, but it doesn't really explain what happens if defaultInitOverride is set! With -Dlog4j.debug=true and the original batch file, i.e. {quote} -Dlog4j.configuration=log4j-server.properties^ -Dlog4j.defaultInitOverride=true^}} {quote} I see: {quote} Starting Cassandra Server log4j: [/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] does not exist. log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. log4j:WARN No appenders could be found for logger (org.apache.cassandra.service.AbstractCassandraDaemon). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. {quote} If I remove the defaultInitOverride, I get: {quote} Starting Cassandra Server log4j: [/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] does not exist. log4j: Trying to find [log4j-server.properties] using context classloader sun.misc.Launcher$AppClassLoader@1a45a877. log4j: Using URL [file:/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties [etc...] {quote} Finally, with: {quote} -Dlog4j.configuration=file:conf/log4j-server.properties^ -Dlog4j.defaultInitOverride=true^ {quote} I get this, if current directory is CASSANDRA_HOME: {quote} Starting Cassandra Server log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. [etc...] {quote} But this, if current directory is CASSANDRA_HOME/bin (e.g. if double-clicking the batch file): {quote} Starting Cassandra Server log4j: [conf/log4j-server.properties] does not exist. log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. log4j:WARN No appenders could be found for logger (org.apache.cassandra.service.AbstractCassandraDaemon). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. {quote} was (Author: dallsopp): @Jonathan - yes, I thought so too, but it doesn't. The default init process for log4j is described at http://logging.apache.org/log4j/1.2/manual.html, but it doesn't really explain what happens if defaultInitOverride is set! With -Dlog4j.debug=true and the original batch file, i.e. -Dlog4j.configuration=log4j-server.properties^ -Dlog4j.defaultInitOverride=true^ I see: Starting Cassandra Server log4j: [/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] does not exist. log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. log4j:WARN No appenders could be found for logger (org.apache.cassandra.service.AbstractCassandraDaemon). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. If I remove the defaultInitOverride, I get: Starting Cassandra Server log4j: [/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] does not exist. log4j: Trying to find [log4j-server.properties] using context classloader sun.misc.Launcher$AppClassLoader@1a45a877. log4j: Using URL [file:/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:/C:/Users/David/Key%20Value/apache-cassandra-0.7.6-2/conf/log4j-server.properties [etc...] Finally, with: -Dlog4j.configuration=file:conf/log4j-server.properties^ -Dlog4j.defaultInitOverride=true^ I get this, if current directory is CASSANDRA_HOME: Starting Cassandra Server log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. [etc...] But this, if current directory is CASSANDRA_HOME/bin (e.g. if double-clicking the batch file): Starting Cassandra Server log4j: [conf/log4j-server.properties] does not exist. log4j: Default initialization of overridden by log4j.defaultInitOverrideproperty. log4j:WARN No appenders could be found for logger (org.apache.cassandra.service.AbstractCassandraDaemon). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. > cassandra.bat does not handle folder names with space characters on windows > --------------------------------------------------------------------------- > > Key: CASSANDRA-2383 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2383 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 0.7.4 > Environment: OS : windows > java : 1.6.0.23 > Reporter: david lee > Assignee: Benjamin Coverston > Priority: Minor > Fix For: 0.7.7 > > > when cassandra home folder is placed inside a folder which has space > characters in its name, > log4j settings are not properly loaded and warning messages are shown. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira