[logback-user] Tomcat 7 and LogbackValve - final method overridden

Paul Gifford pggifford at gmail.com
Thu Sep 22 14:53:19 CEST 2011


Ceki,

  I later discovered there is already an issue for this, LBACCESS-17 (
http://jira.qos.ch/browse/LBACCESS-17).

  There is a fix for it included in this project (which reconfigures Logback
and SLF4J to be Tomcat's internal logger):
https://github.com/grgrzybek/tomcat-slf4j-logback

  He sets the LifecycleState explicitly to enable Logback-access to work
with Tomcat 7, however, that's not necessary.  All that's required in
startInternal() and stopInternal() is to make a call to the overridden
method in each case, i.e. super.startInternal() and super.stopInternal().

  I will update the above Jira ticket with this information.

Thanks!

Paul



On Wed, Sep 21, 2011 at 6:53 PM, Ceki Gülcü <ceki at qos.ch> wrote:

> Hi Paul,
> OK. Thanks for the info. Could you please create a jira issue for this?
> --
> Ceki
> http://twitter.com/ceki
>
>
>
> On 21/09/2011 8:04 PM, Paul Gifford wrote:
>
>> Hi,
>>   We're migrating from Tomcat 6 to Tomcat 7.  I was able to set up
>> Tomcat 6 as instructed on this page:
>> http://logback.qos.ch/access.**html <http://logback.qos.ch/access.html>but when I try to do the same thing
>> with Tomcat 7 I get the following exception:
>> java.lang.VerifyError: JVMVRFY007 final method overridden;
>> class=ch/qos/logback/access/**tomcat/LogbackValve, method=stop()V, pc=0
>> This is because LogbackValve.stop() overrides public final synchronized
>> void stop() in org.apache.catalina.util.**LifecycleBase.
>> LogbackValve.stop() just sets started=false.  What are the consequences
>> of removing the stop method from LogbackValve?  The variable "started"
>> isn't used elsewhere in the class, but it's package protected...I didn't
>> look that closely to see if it's used in by other classes.
>> If "started" isn't needed then I suggest removing it so the stop()
>> method can be removed so LogbackValve will work with Tomcat 7.
>> Paul
>>
>>
>> ______________________________**_________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/**listinfo/logback-user<http://qos.ch/mailman/listinfo/logback-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110922/ff61c196/attachment.html>


More information about the Logback-user mailing list