You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Róbert Csákány (JIRA)" <ji...@apache.org> on 2011/07/21 14:21:57 UTC

[jira] [Created] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
----------------------------------------------------------------------------------

                 Key: SLING-2151
                 URL: https://issues.apache.org/jira/browse/SLING-2151
             Project: Sling
          Issue Type: Bug
          Components: General
    Affects Versions: Parent 10
            Reporter: Róbert Csákány


This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Róbert Csákány (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222171#comment-13222171 ] 

Róbert Csákány commented on SLING-2151:
---------------------------------------

Thank you Sean!
                
> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Sean Kleinjung (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222007#comment-13222007 ] 

Sean Kleinjung commented on SLING-2151:
---------------------------------------

It is possible that the problems encountered using the Freemarker script engine are due to an explicit dependency on slf4j that should not be present. I have reported this issue as SLING-2432, with a patch to resolve that specific issue. (This does not relate to any other bundles that the original reporter may be having difficulties with, however.)
                
> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Justin Edelson (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Edelson resolved SLING-2151.
-----------------------------------

    Resolution: Duplicate

resolving as duplicate of SLING-2432. if that's not the case, feel free to reopen.
                
> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069441#comment-13069441 ] 

Carsten Ziegeler commented on SLING-2151:
-----------------------------------------

Updating the dependency (import) to slf4j higher than 1.5 is dangerous as this makes all bundles fail in existing environments where version 1.5 is exported - so it would force to upgrade the log implementation just to get a bugfix for any bundle in.

> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069241#comment-13069241 ] 

Justin Edelson commented on SLING-2151:
---------------------------------------

This isn't the source of the freemarker error. That's intentional. SLF4J is explicitly *not* imported in the freemarker bundle because Freemarker's SLF4J bridge depends upon some classes in the SLF4J SPI which the Sling Commons Log bundle does not export. Freemarker seems happy to fall through to Log4j or JCL (sorry, forget which one off the top of my head).

> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (SLING-2151) Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1

Posted by "Róbert Csákány (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076107#comment-13076107 ] 

Róbert Csákány commented on SLING-2151:
---------------------------------------

Thanks for answers. I understand the side effects of the version upgrade. 
I've tried the other way to downgraded commons-log back to 1.5.2 of slf4j, I've recompiled and deployed. My problem was a lot of bundle crashed with same error as freemarker. Maybe I'm wrong, but it seems to me that bundles required 1.6.1 version be provided in commons-log - or I made a mistake.

Justin: My problemis the freemarker is not fallback to LOG4J. I don't undersatand why when it's in Ignored-Package. 
The bigger problem is when freemarker crash, all other script engines as well. When I remove freemarker bundle everything works well.

The error message:

01.08.2011 21:54:35.725 *INFO* [FelixDispatchQueue] org.apache.sling.scripting.freemarker BundleEvent STARTED                                                                       
01.08.2011 21:54:35.725 *ERROR* [FelixDispatchQueue] org.apache.sling.scripting.core FrameworkEvent ERROR (java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory) java.lang.NoClas
sDefFoundError: org/slf4j/LoggerFactory                                                                                                                                             
        at org.apache.sling.scripting.freemarker.FreemarkerScriptEngine.<clinit>(FreemarkerScriptEngine.java:42)                                                                    
        at org.apache.sling.scripting.freemarker.FreemarkerScriptEngineFactory.getScriptEngine(FreemarkerScriptEngineFactory.java:107)                                              
        at javax.script.ScriptEngineManager.getEngineByExtension(ScriptEngineManager.java:256)                                                                                      
        at org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.refreshScriptEngineManager(ScriptEngineManagerFactory.java:123)                                          
        at org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory.bundleChanged(ScriptEngineManagerFactory.java:187)                                                       
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)                                                                   
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)                                                                           
        at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)                                                                                            
        at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)                                                                                      
        at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)                                                                                          
        at java.lang.Thread.run(Thread.java:662)                                                                                                                                    
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory not found by org.apache.sling.scripting.freemarker [99]                                                        
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)                                                                               
        at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)                                                                                                     
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)                                                                                  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)                                                                                                                    
        ... 11 more                                                             

> Parent POM defines sl4j 1.5.2 while the org.apache.sling.commons.log exports 1.6.1
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2151
>                 URL: https://issues.apache.org/jira/browse/SLING-2151
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>    Affects Versions: Parent 10
>            Reporter: Róbert Csákány
>
> This causes problems in bundles - for example scripting.freemarker. (LoggerFactory class not found). I've updated in Parent POM in my machine to 1.6.1 and it seems OK.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira