Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004271 [Resin] minor always 10-26-10 11:02 11-17-10 10:49
Reporter alex View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.14 Product Version 4.0.12
  Product Build
Summary 0004271: log4j fails to load custom logger
Description rep by Nicolai Steven "Resin 4.0.12 classloader issue"

We've noticed that 4.0.12 has a classloader issue.

Enclosed is a sample web app that can be used to recreate the problem.

Steps:

1. copy the web application (testsess) into resin 4.0.10/webapps.
2. start resin with bin/resin.sh console
3. visit <server>/testsess/testLog.jsp
4. Look in the console log, you'll see "....- Should be in the log."
error messages.

Repeat with resin 4.0.12

When you start resin with bin/resin.sh console, you'll see the following
in the console:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder [^] for
further details.

These messages do not appear when the same web application is started
with 4.0.10.

When you look at the logs in step 4, the error messages will not be in
the logs (because slf4j was not properly loaded.

We're also seeing intermittant class loading issues elsewhere in our
application, occasionally one of a few classes that are present in the
web application will not load. I don't have a reproducible test case
for this. Hopefully, it is related to this one.
Steps To Reproduce
Additional Information
Attached Files

- Relationships
related to 0004275closed ferg ClassNotFoundException: javax.faces.application.ViewHandlerWrapper 

- Notes
(0004804)
hontvari
10-29-10 18:20
edited on: 10-30-10 03:54

I also see the same issue with the Slf4J logging API and Logback but I have no custom loggers (although I am not sure what Nicolai meant on "custom logger"). 4.0.10 works, 4.0.12 does not work with the exact same war.

There is another Slf4J warning on 4.0.10. That is old, it occurred on previous versions too, but maybe there is a relation. It seems that Resin passes a classpath to Slf4J which contain duplicate entries. The warning is the following:
03:00:03,716 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource
[file:/C:/home/mireka-2.1/conf/logback.xml] occurs multipl
e times on the classpath.
03:00:03,716 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource
[file:/C:/home/mireka-2.1/conf/logback.xml] occurs at [fil
e:/C:/home/mireka-2.1/conf/logback.xml]
... (3 times)

 
(0004805)
hontvari
10-30-10 03:58

I wrote that the issue is with Log4j, that was wrong. I edited my original note, so now it shows SLF4J and Logback.
 
(0004852)
ferg
11-17-10 10:49

slf4j removed from distribution, since Resin does not depend on it.

The slf4j can be removed from resin/lib as a workaround.
 

- Issue History
Date Modified Username Field Change
10-26-10 11:02 alex New Issue
10-28-10 09:36 alex Relationship added related to 0004275
10-29-10 18:20 hontvari Note Added: 0004804
10-30-10 03:54 hontvari Note Edited: 0004804
10-30-10 03:58 hontvari Note Added: 0004805
11-02-10 13:15 nicolai Issue Monitored: nicolai
11-17-10 10:49 ferg Note Added: 0004852
11-17-10 10:49 ferg Assigned To  => ferg
11-17-10 10:49 ferg Status new => closed
11-17-10 10:49 ferg Resolution open => fixed
11-17-10 10:49 ferg Fixed in Version  => 4.0.14


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
41 total queries executed.
32 unique queries executed.
Powered by Mantis Bugtracker