Looks like this wasn't an issue after all. After enabling 
"openejb.check.classloader = true" I found that the war contained apacheds-all 
which embeds an old slf4j classes within itself. After removing the offending 
jar logging seems to work as expected.

Trevor Stevens
tstev...@me.com


On Feb 7, 2014, at 11:04 AM, Romain Manni-Bucau <rmannibu...@gmail.com> wrote:

> so you'll need to reproduce it in a sample to let us have a look
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 
> 2014-02-07 Trevor Stevens <tstev...@me.com>:
>> Ok in that case think something is not working correctly. I have both 
>> slf4j-api & slf4j-log4j inside the webapp and I have issues with either of 
>> the configurations I have tried (with delegate=false or without).
>> 
>> webapp/lib
>> slf4j-api-1.6.4.jar
>> slf4j-log4j12-1.6.4.jar
>> 
>> TomEE/lib
>> slf4j-api-1.7.5.jar
>> slf4j-jdk14-1.7.5.jar
>> 
>> Trevor Stevens
>> tstev...@me.com
>> 
>> 
>> On Feb 7, 2014, at 10:44 AM, Romain Manni-Bucau <rmannibu...@gmail.com> 
>> wrote:
>> 
>>> as I said before providing in the webapp slf4j-api AND slf4j-log4j (or
>>> any other binding) it should work
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>> 
>>> 
>>> 
>>> 2014-02-07 Trevor Stevens <tstev...@me.com>:
>>>> Ok so my understanding is since slf4j-jdk14-1.7.5.jar is present in 
>>>> TomEE's lib it is not possible for a webapp to provide their own SLF4J 
>>>> binding within their webapp?
>>>> 
>>>> Trevor Stevens
>>>> tstev...@me.com
>>>> 
>>>> 
>>>> On Feb 7, 2014, at 10:04 AM, Romain Manni-Bucau <rmannibu...@gmail.com> 
>>>> wrote:
>>>> 
>>>>> the point is it is working so your case should be quite different, the
>>>>> other point is there is no link to classes but resources regarding
>>>>> which one is loaded (that's how slf4j works)
>>>>> Romain Manni-Bucau
>>>>> Twitter: @rmannibucau
>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>> Github: https://github.com/rmannibucau
>>>>> 
>>>>> 
>>>>> 
>>>>> 2014-02-07 Trevor Stevens <tstev...@me.com>:
>>>>>> If I remove delegate=false I get a slightly different message. Looks 
>>>>>> like in this case it is loading one jar from the war and one from TomEE. 
>>>>>> Is there not a way to force the war classloader first? I thought that 
>>>>>> was the point of the delegate false configuration.
>>>>>> 
>>>>>> SLF4J: The requested version 1.6 by your slf4j binding is not compatible 
>>>>>> with [1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10]
>>>>>> SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further 
>>>>>> details.
>>>>>> 
>>>>>> Trevor Stevens
>>>>>> tstev...@me.com
>>>>>> 
>>>>>> 
>>>>>> On Feb 7, 2014, at 9:52 AM, Romain Manni-Bucau <rmannibu...@gmail.com> 
>>>>>> wrote:
>>>>>> 
>>>>>>> so it means yes :p
>>>>>>> 
>>>>>>> well providing slf4j-api AND slf4j-<impl> it should work without any 
>>>>>>> config
>>>>>>> Romain Manni-Bucau
>>>>>>> Twitter: @rmannibucau
>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>> Github: https://github.com/rmannibucau
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 2014-02-07 Trevor Stevens <tstev...@me.com>:
>>>>>>>> No, it comes bundled within the war. I would prefer to leave the war 
>>>>>>>> alone if possible instead of removing SLF4J from the webapp.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Trevor Stevens
>>>>>>>> tstev...@me.com
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Feb 7, 2014, at 9:47 AM, Romain Manni-Bucau <rmannibu...@gmail.com> 
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Hi
>>>>>>>>> 
>>>>>>>>> did you put slf4j api in the webapp?
>>>>>>>>> Romain Manni-Bucau
>>>>>>>>> Twitter: @rmannibucau
>>>>>>>>> Blog: http://rmannibucau.wordpress.com/
>>>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>>>>>>> Github: https://github.com/rmannibucau
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 2014-02-07 Trevor Stevens <tstev...@me.com>:
>>>>>>>>>> I am having issues getting SLF4J logging working in an existing war. 
>>>>>>>>>> It looks like TomEE is ignoring the delegate configuration for SLF4J 
>>>>>>>>>> classes. Am I missing something in my configuration? I would have 
>>>>>>>>>> expected TomEE to load the SLF4J binder from the war when configured 
>>>>>>>>>> in this manner.
>>>>>>>>>> 
>>>>>>>>>> context.xml
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>> <Context >
>>>>>>>>>> <Loader delegate="false" />
>>>>>>>>>> </Context>
>>>>>>>>>> 
>>>>>>>>>> SLF4J: The requested version 1.6 by your slf4j binding is not 
>>>>>>>>>> compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10]
>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for 
>>>>>>>>>> further details.
>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>> SLF4J: Found binding in 
>>>>>>>>>> [jar:file:/Users/tstevens/Downloads/apache-tomee-plus-1.6.1-SNAPSHOT/lib/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>> SLF4J: Found binding in 
>>>>>>>>>> [jar:file:/Users/tstevens/Downloads/apache-tomee-plus-1.6.1-SNAPSHOT/webapps/cas/WEB-INF/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
>>>>>>>>>> explanation.
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Trevor Stevens
>>>>>>>>>> tstev...@me.com
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>> 
>> 

Reply via email to