Details

    • Branch Version/s:
      6.2.x, 6.1.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 5 results 

      Description

      Into util-java-6.1.0, there are classes relative to slf4j :

      • org.slf4j.impl.StaticLoggerBinder
      • org.slf4j.impl.StaticMarkerBinder
      • org.slf4j.impl.StaticMDCBinder
        Is this normal ?

      While compiling my project, I get :
      SLF4J: The requested version 1.6.4 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, 1.5.11]
      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:/home/rogon/.m2/repository/com/liferay/portal/util-java/6.1.0/util-java-6.1.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/rogon/.m2/repository/org/slf4j/slf4j-log4j12/1.5.11/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

      I have to admit that I'm not a big fan of defining classes with the same namespace of well-known framework / toolkit ...

      I think these 3 classes should be in a separate module that follow slf4j connector convention : slf4j-liferay-1.6.4.jar
      That way, we clearly see that it is a liferay connector and that it needs slf4j 1.6.4.

        Issue Links

          Activity

          Hide
          Mark A. Ziesemer added a comment -

          Also to note: Liferay doesn't provide the SLF4J APIs (e.g. slf4j-api-1.7.2.jar) into each webapp, through util-java.jar or otherwise. Without providing the API, why is Liferay providing the static binding for it? (And no, please don't also include the SLF4J APIs to "fix" this - we need to be able to choose our own version of SLF4J if required.)

          Additionally, if a WAR / plugin author would choose to use the Liferay SLF4J binding (LiferayLoggerFactory), besides using the (new) artifact for it from the Maven repository (which would be the Liferay-agnostic, "standard" approach), one could also use the portal-dependency-jars property of liferay-plugin-package.properties to automatically include it at runtime from the Liferay context.

          Show
          Mark A. Ziesemer added a comment - Also to note: Liferay doesn't provide the SLF4J APIs (e.g. slf4j-api-1.7.2.jar ) into each webapp, through util-java.jar or otherwise. Without providing the API, why is Liferay providing the static binding for it? (And no, please don't also include the SLF4J APIs to "fix" this - we need to be able to choose our own version of SLF4J if required.) Additionally, if a WAR / plugin author would choose to use the Liferay SLF4J binding ( LiferayLoggerFactory ), besides using the (new) artifact for it from the Maven repository (which would be the Liferay-agnostic, "standard" approach), one could also use the portal-dependency-jars property of liferay-plugin-package.properties to automatically include it at runtime from the Liferay context.
          Hide
          Mark A. Ziesemer added a comment -

          Michael / Brian - thanks for working on this! It means a lot.

          I see on one of the commits, "moving slf4j bindings to new jar". I'm assuming / hoping that this new JAR won't be deployed into portlet webapps by default?

          I'll continue to monitor this ticket, and would be more than willing to provide any additional testing / review that you can send my way.

          Thanks again!

          Show
          Mark A. Ziesemer added a comment - Michael / Brian - thanks for working on this! It means a lot. I see on one of the commits, "moving slf4j bindings to new jar". I'm assuming / hoping that this new JAR won't be deployed into portlet webapps by default? I'll continue to monitor this ticket, and would be more than willing to provide any additional testing / review that you can send my way. Thanks again!
          Hide
          Hakan Tandogan added a comment -

          Mark, could you please provide a link to the commit where "slf4j bindings to new jar" were moved? I'd like to monitor that part as well to possibly backport it to our installation.

          Show
          Hakan Tandogan added a comment - Mark, could you please provide a link to the commit where "slf4j bindings to new jar" were moved? I'd like to monitor that part as well to possibly backport it to our installation.
          Hide
          Mark A. Ziesemer added a comment -

          Hakan - I just followed the "Git Pull Request" link posted under "Michael Han made changes - Today 8:34 AM": https://github.com/brianchandotcom/liferay-portal/pull/8848

          Show
          Mark A. Ziesemer added a comment - Hakan - I just followed the "Git Pull Request" link posted under "Michael Han made changes - Today 8:34 AM": https://github.com/brianchandotcom/liferay-portal/pull/8848
          Hide
          Michael Saechang added a comment -

          Committed on:
          Portal 6.2.x GIT ID: 6a1b2b2fa6e4eb2a52fe25cf532ae778fdcf6ace.

          Show
          Michael Saechang added a comment - Committed on: Portal 6.2.x GIT ID: 6a1b2b2fa6e4eb2a52fe25cf532ae778fdcf6ace.

            People

            • Votes:
              14 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 10 weeks, 5 days ago

                Development

                  Structure Helper Panel