You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2012/05/01 17:19:49 UTC

[jira] [Created] (SOLR-3426) CoreContainer goes looking for nonexistent Log4j class

Benson Margulies created SOLR-3426:
--------------------------------------

             Summary: CoreContainer goes looking for nonexistent Log4j class
                 Key: SOLR-3426
                 URL: https://issues.apache.org/jira/browse/SOLR-3426
             Project: Solr
          Issue Type: Bug
    Affects Versions: 4.0
            Reporter: Benson Margulies


The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 

      // Now load the framework
      if(fname!=null) {
        if("JUL".equalsIgnoreCase(fname)) {
          logging = new JulWatcher(slf4jImpl);
        }
//        else if( "Log4j".equals(fname) ) {
//          logging = new Log4jWatcher(slf4jImpl);
//        }
        else {
          try {
            logging = loader.newInstance(fname, LogWatcher.class);
          }
          catch (Throwable e) {
            log.warn("Unable to load LogWatcher", e);
          }
        }



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3426) Verbose error message when Log4j is enabled

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-3426:
--------------------------------

      Priority: Trivial  (was: Major)
      Assignee: Ryan McKinley
    Issue Type: Improvement  (was: Bug)
       Summary: Verbose error message when Log4j is enabled  (was: CoreContainer goes looking for nonexistent Log4j class)
    
> Verbose error message when Log4j is enabled
> -------------------------------------------
>
>                 Key: SOLR-3426
>                 URL: https://issues.apache.org/jira/browse/SOLR-3426
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Ryan McKinley
>            Priority: Trivial
>         Attachments: solr-3426.patch
>
>
> The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 
>       // Now load the framework
>       if(fname!=null) {
>         if("JUL".equalsIgnoreCase(fname)) {
>           logging = new JulWatcher(slf4jImpl);
>         }
> //        else if( "Log4j".equals(fname) ) {
> //          logging = new Log4jWatcher(slf4jImpl);
> //        }
>         else {
>           try {
>             logging = loader.newInstance(fname, LogWatcher.class);
>           }
>           catch (Throwable e) {
>             log.warn("Unable to load LogWatcher", e);
>           }
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3426) CoreContainer goes looking for nonexistent Log4j class

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies updated SOLR-3426:
-----------------------------------

    Attachment: solr-3426.patch

here is a temporary fix that removes all the noisy backtracing from the log.
                
> CoreContainer goes looking for nonexistent Log4j class
> ------------------------------------------------------
>
>                 Key: SOLR-3426
>                 URL: https://issues.apache.org/jira/browse/SOLR-3426
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: solr-3426.patch
>
>
> The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 
>       // Now load the framework
>       if(fname!=null) {
>         if("JUL".equalsIgnoreCase(fname)) {
>           logging = new JulWatcher(slf4jImpl);
>         }
> //        else if( "Log4j".equals(fname) ) {
> //          logging = new Log4jWatcher(slf4jImpl);
> //        }
>         else {
>           try {
>             logging = loader.newInstance(fname, LogWatcher.class);
>           }
>           catch (Throwable e) {
>             log.warn("Unable to load LogWatcher", e);
>           }
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3426) CoreContainer goes looking for nonexistent Log4j class

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265880#comment-13265880 ] 

Ryan McKinley commented on SOLR-3426:
-------------------------------------

right -- if you are using Log4j, the LogWatcher stuff will not work.

In the current behavior, you should get a warning in the logs and when you try the logging UI it will give a warning that it did not load.

See: SOLR-3399 and SOLR-3358 that look at ways to capture log4j events.  

                
> CoreContainer goes looking for nonexistent Log4j class
> ------------------------------------------------------
>
>                 Key: SOLR-3426
>                 URL: https://issues.apache.org/jira/browse/SOLR-3426
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>
> The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 
>       // Now load the framework
>       if(fname!=null) {
>         if("JUL".equalsIgnoreCase(fname)) {
>           logging = new JulWatcher(slf4jImpl);
>         }
> //        else if( "Log4j".equals(fname) ) {
> //          logging = new Log4jWatcher(slf4jImpl);
> //        }
>         else {
>           try {
>             logging = loader.newInstance(fname, LogWatcher.class);
>           }
>           catch (Throwable e) {
>             log.warn("Unable to load LogWatcher", e);
>           }
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-3426) Verbose error message when Log4j is enabled

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley resolved SOLR-3426.
---------------------------------

    Resolution: Fixed

removed the error trace in revision: 1332752
                
> Verbose error message when Log4j is enabled
> -------------------------------------------
>
>                 Key: SOLR-3426
>                 URL: https://issues.apache.org/jira/browse/SOLR-3426
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Ryan McKinley
>            Priority: Trivial
>         Attachments: solr-3426.patch
>
>
> The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 
>       // Now load the framework
>       if(fname!=null) {
>         if("JUL".equalsIgnoreCase(fname)) {
>           logging = new JulWatcher(slf4jImpl);
>         }
> //        else if( "Log4j".equals(fname) ) {
> //          logging = new Log4jWatcher(slf4jImpl);
> //        }
>         else {
>           try {
>             logging = loader.newInstance(fname, LogWatcher.class);
>           }
>           catch (Throwable e) {
>             log.warn("Unable to load LogWatcher", e);
>           }
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3426) CoreContainer goes looking for nonexistent Log4j class

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265900#comment-13265900 ] 

Benson Margulies commented on SOLR-3426:
----------------------------------------

To be clear, the 'warning' is a screenful of backtraces, and that's pretty scary and annoying.


                
> CoreContainer goes looking for nonexistent Log4j class
> ------------------------------------------------------
>
>                 Key: SOLR-3426
>                 URL: https://issues.apache.org/jira/browse/SOLR-3426
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: solr-3426.patch
>
>
> The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree. 
>       // Now load the framework
>       if(fname!=null) {
>         if("JUL".equalsIgnoreCase(fname)) {
>           logging = new JulWatcher(slf4jImpl);
>         }
> //        else if( "Log4j".equals(fname) ) {
> //          logging = new Log4jWatcher(slf4jImpl);
> //        }
>         else {
>           try {
>             logging = loader.newInstance(fname, LogWatcher.class);
>           }
>           catch (Throwable e) {
>             log.warn("Unable to load LogWatcher", e);
>           }
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org