[slf4j-user] slf4j-api 1.7.8 broken?

Elliot Huntington elliot.huntington at gmail.com
Tue Dec 16 19:17:31 CET 2014


I understand now. Thank you Robert.

On Tue, Dec 16, 2014 at 10:46 AM, Robert Elliot <rob at lidalia.org.uk> wrote:
>
> It’s a scalac bug, not an SLF4J bug. See here:
> https://issues.scala-lang.org/browse/SI-5420
>
>
>
>
> On 16 Dec 2014, at 17:30, Elliot Huntington <elliot.huntington at gmail.com>
> wrote:
>
> Please see the attached sscce and the bundled build.gradle file. It
> contains notes on how to reproduce the problem. It is configured by default
> to produce the problem. If you comment out the dependency for slf4j-api
> version 1.7.8 and add the line for the dependency to version 1.7.7,
> everything works fine.
>
> Please be sure to run the sscce with the following to make sure you're not
> caching any dependencies:
>
> $ gradle clean run
>
> ------ Here is my environment configuration ------
>
> $ uname -a
> Linux machinename 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC
> 2014 x86_64 x86_64 x86_64 GNU/Linux
> (This is Linux Mint 17 with Cinnamon)
>
> export JAVA_HOME=/home/username/apps/java_home
> export GRADLE_HOME=/home/username/apps/gradle_home
> export SCALA_HOME=/home/username/apps/scala-2.10.3
>
> $ java -version
> java version "1.7.0_55"
> Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
>
> $ scala -version
> Scala code runner version 2.10.3 -- Copyright 2002-2013, LAMP/EPFL
>
> $ gradle --version
>
> ------------------------------------------------------------
> Gradle 1.12
> ------------------------------------------------------------
>
> Build time:   2014-04-29 09:24:31 UTC
> Build number: none
> Revision:     a831fa866d46cbee94e61a09af15f9dd95987421
>
> Groovy:       1.8.6
> Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
> Ivy:          2.2.0
> JVM:          1.7.0_55 (Oracle Corporation 24.55-b03)
> OS:           Linux 3.13.0-24-generic amd64
>
>
>
> On Mon, Dec 15, 2014 at 11:55 PM, Robert Elliot <rob at lidalia.org.uk>
> wrote:
>>
>> He's writing Scala - the Scala compiler needs all annotation classes on
>> the compile time class path, unlike javac which doesn't mind them.
>>
>> > On 16 Dec 2014, at 06:24, Ceki Gülcü <ceki at qos.ch> wrote:
>> >
>> >
>> > I am assuming it's a build time error (not runtime) and you are using
>> gradle. Can you clean gradle cache?
>> >
>> >> On 12/16/2014 7:22, Ceki Gülcü wrote:
>> >> Hi Elliot,
>> >>
>> >> We added the JSR 305 @Nonnull into ILoggerFactory interface and
>> >> LoggerFactory class in version 1.7.8.
>> >>
>> >> I have just verified that client code builds just fine without
>> >> com.google.code.findbugs:jsr305 being present on the class path.
>> >>
>> >> Can you tell use more about your build environment. JDK version. Build
>> >> tool etc.
>> >>
>> >> Are you doing a clean build?
>> >>
>> >> Cheers,
>> >>
>> >> --
>> >> Ceki
>> >>
>> >>> On 12/15/2014 23:58, Elliot Huntington wrote:
>> >>> slf4j-api version 1.7.8 was released to the maven central repository
>> on
>> >>> 2014-12-14, which was yesterday. Today one of my builds that depended
>> on
>> >>> slf4j-api with a version range from 1.7.5 -> 1.7.8 started to break.
>> I'm
>> >>> getting error messages like this:
>> >>>
>> >>> Class javax.annotation.Nonnull not found - continuing with a stub.
>> >>> Caught: java.lang.NullPointerException while parsing annotations in
>> >>>
>> /home/username/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.8/40d4abec9e853fd9f17fb144f1e7c2c5bab52af9/slf4j-api-1.7.8.jar(org/slf4j/LoggerFactory.class)
>> >>>
>> >>> error while loading LoggerFactory, class file
>> >>>
>> '/home/username/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.8/40d4abec9e853fd9f17fb144f1e7c2c5bab52af9/slf4j-api-1.7.8.jar(org/slf4j/LoggerFactory.class)'
>> >>>
>> >>> is broken
>> >>> (class java.lang.RuntimeException/bad constant pool index: 0 at pos:
>> >>> 9496)
>> >>>
>> /home/username/projects/1.0.5-gradle/common/src/main/scala/company/product/common/LogHelper.scala:14:
>> >>>
>> >>> value getLogger is not a member of object org.slf4j.LoggerFactory
>> >>>   lazy val logger = LoggerFactory.getLogger(this.getClass)
>> >>>                                                      ^
>> >>>
>> >>> Has getLogger purposefully been removed from the slf4j-api version
>> 1.7.8
>> >>> or is it possible that the artifact uploaded to the maven central
>> >>> repository is corrupted? This is a breaking change.
>> >>>
>> >>> After excluding all transitive dependencies to slf4j-api from my
>> project
>> >>> and explicitly using version 1.7.7, my project builds fine again. What
>> >>> happened in version 1.7.8 that was released to the maven central
>> >>> repository yesterday?
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> slf4j-user mailing list
>> >>> slf4j-user at qos.ch
>> >>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>> >> _______________________________________________
>> >> slf4j-user mailing list
>> >> slf4j-user at qos.ch
>> >> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>> > _______________________________________________
>> > slf4j-user mailing list
>> > slf4j-user at qos.ch
>> > http://mailman.qos.ch/mailman/listinfo/slf4j-user
>> _______________________________________________
>> slf4j-user mailing list
>> slf4j-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>>
> <sscce.tgz>_______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
>
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20141216/bf41fda3/attachment.html>


More information about the slf4j-user mailing list