[JIRA] Created: (LBCLASSIC-212) Logback classic doesn't work with Tomcat

Logback classic doesn't work with Tomcat ---------------------------------------- Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: -------------------------------------- Are you sure that the version of logback-core you are using is the same as logback-classic? Alternatively, is it possible that you might have multiple copies of logback-classic with different versions?
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Andy Duplain commented on LBCLASSIC-212: ---------------------------------------- I can confirm this issue; after failing to find a datasource during Servlet initiation, the server appears to lock-up (I have added a message after the exception report and this message doesn't show up). I am using tomcat 6.0.26, logback-core and -classic 0.9.21 with slf4j-api-1.6.0. All logback and slf4j jars are installed into tomcat/lib and are not part of the application's war file. Example log output: INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/fdews-ActionsService-ActionsPort 12:04:07.704 [main] DEBUG com.neuralt.fdews.ActionsServlet - init(config) 12:04:07.708 [main] DEBUG com.neuralt.fdews.Actions - init 12:04:07.710 [main] DEBUG com.neuralt.util.DbConnection - Getting JNDI connection 'dev10g21' 12:04:07.717 [main] ERROR com.neuralt.util.DbConnection - Exception while getting database connection javax.naming.NameNotFoundException: Name dev10g21 is not bound in this Context
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Andy Duplain commented on LBCLASSIC-212: ---------------------------------------- I have now tried logback 0.9.24 and slf4j 1.6.1 with no change - the issue still exists.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: -------------------------------------- I've spent sometime trying to recreate this issue but without much success. Could you provide a small web-app so that I can recreate the issue?
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Andy Duplain commented on LBCLASSIC-212: ---------------------------------------- I have made some progress on this. Tomcat does not lock-up when it is run outside of Netbeans, so it's certainly NOT a logback issue. This Netbeans bug report confirms that there is an issue with tomcat exception output under Netbeans: http://netbeans.org/bugzilla/show_bug.cgi?id=179199 I think I (and probably the OP) are suffering from this issue. Sorry to mislead you.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: -------------------------------------- Andy, do you know the initial reporter of this issue, namely Grzegorz Borkowski? He seems convinced that logback is the culprit.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Grzegorz Borkowski commented on LBCLASSIC-212: ---------------------------------------------- For unknown reasons, I haven't got any mail notification about activity on this issue, despite the fact that I'm reporter of this issue (and watcher too), until today when I got direct mail from Ceki - that's why I thought that nobody looked at this issue yet. I was able to kind of fix this problem by adding one line of code: in the ExceptionHandler class that handles all exceptions thrown in application (it's spring application, so it is a class declared as exception handler in spring config), I added this line: log.error(ex.getMessage(), ex); Earlier, we haven't logged the exception in our code. So my guess was that earlier the exceptions propagated to tomcat, which tried to log the stack trace, which could cause loading some classes, and because of some classloader issues the class was not found, which caused trhowing again the exception, which was tried to be logged by tomcat, and endless loop happened. After adding this line, the error was logged by application, so loading of required class happened in application classloader, and class was found. But it's just the guess. The really really big stack trace that I was able to see suggested the endless loop, but in case of endless loop CPU usage should be high, but it wasn't, which would suggest rather kind of deadlock. If I have time (which I can't guarantee) I can try to reproduce it by deleting this line and attach the project source, if I succeed.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: -------------------------------------- The jira notification was misconfigured so that the reporter nor the watchers of an event got notifications. The notification problem has been fixed. Coming back to the actual problem, since it is so dependent on the execution environment, without a clear recipe to reproduce it, there is not much I can do except to empathize.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Grzegorz Borkowski commented on LBCLASSIC-212: ---------------------------------------------- Ok, so let's put it this way: if I have time and I'm able to reproduce it, I will post the code. If not, we can close this issue.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Nils Rudolph commented on LBCLASSIC-212: ---------------------------------------- I thing i have the same issue. If a excpetion is logged, the server starts to hang. There is no more printing to the console and if i try to shutdown tomcat it hangs and has to be killed. It happens only if you use loback and starts the webapp whithin netbeans. I am attaching a minimal sample, it is a maven project with one servlet "test". This servlet throws a exception and tries to log it. After that the server hangs and cannot be stoped whithout killing it. I am using Netbeans 6.9.1, Tomcat 6.0.29, sl4j 1.6.1 and loback 0.9.26. I hope that helps.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Nils Rudolph updated LBCLASSIC-212: ----------------------------------- Attachment: Sample Maven Project.zip
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ron Koerner commented on LBCLASSIC-212: --------------------------------------- I also seem to have the same problem with slightly different symptoms. I'm using Netbeans 6.9, Tomcat 6.0.26, slf4j 1.6.1 and logback 0.9.26. When my webapp throws an exception the logging in Netbeans stops but the application continues to work fine. There is also no problem with restarting the server. When using the same webapp without Netbeans, there is no problem. I assume the problem lies somewhere with Netbeans' parsing of the log. Since the only difference to a "normal" stacktrace is the packaging information, I'd like to try to turn that off, but so far I haven't found out how to do that or if that is possible at all.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ron Koerner commented on LBCLASSIC-212: --------------------------------------- Strangely, the problem is only there if all three components are there. If only two of {Netbeans, Tomcat, logback} are used in conjunction then it works fine. To prove my assumption I looked a little bit harder into the docs and came up with this configuration file, which I assume is the same the BasicConfigurator would produce with the exception of the explicitely added %throwable: <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>new %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%throwable</pattern> </encoder> </appender> <root level="TRACE"> <appender-ref ref="stdout"/> </root> </configuration> With this my webapp runs like a charm even in Netbeans.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: --------------------------------------
From this latest description it looks like it's a Netbeans issue as well. I would encourage you post a bug report on the appropriate Netbeans channels.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu edited comment on LBCLASSIC-212 at 11/8/10 10:02 PM: ---------------------------------------------------------------- Ron thank you for your input. From your latest description it looks like the problem is a Netbeans issue as well. I would encourage you post a bug report on the appropriate Netbeans channels. Would you contact Netbeans folks? was (Author: noreply.ceki@qos.ch): From this latest description it looks like it's a Netbeans issue as well. I would encourage you post a bug report on the appropriate Netbeans channels.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ron Koerner commented on LBCLASSIC-212: --------------------------------------- Currently there seem to be network problems between me and netbeans.org, but I'll post a bug report there and will cross-link the bugs, as soon as possible.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-212: -------------------------------------- Thanks Ron. Your help is much appreciated.
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-212?page=com.atlassian.jira.plugin.syste... ] Ron Koerner commented on LBCLASSIC-212: --------------------------------------- The corresponding Netbeans issue is http://netbeans.org/bugzilla/show_bug.cgi?id=191810
Logback classic doesn't work with Tomcat ----------------------------------------
Key: LBCLASSIC-212 URL: http://jira.qos.ch/browse/LBCLASSIC-212 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.21 Reporter: Grzegorz Borkowski Assignee: Logback dev list Priority: Critical Attachments: Sample Maven Project.zip
We have a web application running on Tomcat 6.0.26, which uses SLF4J for logging. Until now, we used SLF4J-Simple, and it worked very well. Now we try to switch to Logback, but we are not able to make it work. It works for logging one-line messages. But whenever any exception is thrown on server, which should print a stack trace, server hangs (It doesn't matter whether we actually print the stack trace in log or not). From what I was able to observe, it looks like it falls into endless loop, throwing "ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxyUtil", which is caught and tried to be logged, which throws this exception again, and so on. I don't know why it throws this ClassNotFoundException - perhaps classloader issue? But even copying the logback jars to Tomcat's lib directory, I'm not able to run the application: than it has problems with starting up. Sometimes it freezes during loading web app, and often it helps to attach and detach debugger to Tomcat - it's a kind of magic... Anyway, it's horrendously painful, and I'm not able to make it work. Why such common setup (webapp on Tomcat) is not described in Logback documentation??? This is our configuration file : <configuration scan="true"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n%ex</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="STDOUT" /> </root> </configuration> (changing scan to "false" doesn't help. Also changing pattern to the one not containing "%ex" doesn't help) This is part of pom file related to logging: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.21</version> <scope>runtime</scope> </dependency> <!-- prevent JCL bundling into final WAR by using scope="provided" --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- use this as adpater to satisfy dependencies on JCL --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.0</version> </dependency> If we change dependency from logback to SLF4J simple (1.6.0) than everything works smoothly, stacktraces are printed to console, no freezing, everything is perfect.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira



participants (6)
-
Andy Duplain (JIRA)
-
Ceki Gulcu (JIRA)
-
Eric Schwarzenbach (JIRA)
-
Grzegorz Borkowski (JIRA)
-
Nils Rudolph (JIRA)
-
Ron Koerner (JIRA)