You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/10/12 09:27:02 UTC

[jira] [Created] (LOG4J2-97) The Log4j 1.x compatibility bridge does not implement enough of Log4j

Ralph Goers created LOG4J2-97:
---------------------------------

             Summary: The Log4j 1.x compatibility bridge does not implement enough of Log4j
                 Key: LOG4J2-97
                 URL: https://issues.apache.org/jira/browse/LOG4J2-97
             Project: Log4j 2
          Issue Type: Bug
          Components: log4j 1.2 emulation
    Affects Versions: 2.0-beta2
            Reporter: Ralph Goers


When running an application the following stack trace was encountered.

catching java.lang.NoSuchMethodError: org.apache.log4j.Logger.addAppender(Lorg/apache/log4j/Appender;)V
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:127) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:112) ~[velocity-1.7.jar:1.7]
at org.apache.velocity.app.Velocity.init(Velocity.java:74) ~[velocity-1.7.jar:1.7]

To be useful the compatibility bridge must provide some sort of support for these kinds of usages.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Commented] (LOG4J2-97) The Log4j 1.x compatibility bridge does not implement enough of Log4j

Posted by "Ralph Goers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4J2-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475471#comment-13475471 ] 

Ralph Goers commented on LOG4J2-97:
-----------------------------------

The workaround for the above problem consists of choosing from one of the following 3 options:

1. http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html#usinglog4jwithexistinglogger documents how to use an existing Log4j Logger. If this is done Velocity won't create an Appender and all is well.
2. http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html#simpleexampleofacustomlogger shows how to use a custom Logger.  By calling  "Velocity.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM, new
org.apache.velocity.slf4j.Slf4jLogChute())" before calling Velocity.init() Velocity will use SLF4J. 
3. The same as item 2 but implement a LogChute for Log4j 2.x.
                
> The Log4j 1.x compatibility bridge does not implement enough of Log4j
> ---------------------------------------------------------------------
>
>                 Key: LOG4J2-97
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-97
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: log4j 1.2 emulation
>    Affects Versions: 2.0-beta2
>            Reporter: Ralph Goers
>
> When running an application the following stack trace was encountered.
> catching java.lang.NoSuchMethodError: org.apache.log4j.Logger.addAppender(Lorg/apache/log4j/Appender;)V
> at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:127) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:112) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.app.Velocity.init(Velocity.java:74) ~[velocity-1.7.jar:1.7]
> To be useful the compatibility bridge must provide some sort of support for these kinds of usages.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Closed] (LOG4J2-97) The Log4j 1.x compatibility bridge does not implement enough of Log4j

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

Ralph Goers closed LOG4J2-97.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-beta3
         Assignee: Ralph Goers

Fixed in revision 1398144.
                
> The Log4j 1.x compatibility bridge does not implement enough of Log4j
> ---------------------------------------------------------------------
>
>                 Key: LOG4J2-97
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-97
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: log4j 1.2 emulation
>    Affects Versions: 2.0-beta2
>            Reporter: Ralph Goers
>            Assignee: Ralph Goers
>             Fix For: 2.0-beta3
>
>
> When running an application the following stack trace was encountered.
> catching java.lang.NoSuchMethodError: org.apache.log4j.Logger.addAppender(Lorg/apache/log4j/Appender;)V
> at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:127) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:112) ~[velocity-1.7.jar:1.7]
> at org.apache.velocity.app.Velocity.init(Velocity.java:74) ~[velocity-1.7.jar:1.7]
> To be useful the compatibility bridge must provide some sort of support for these kinds of usages.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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