<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It’s a scalac bug, not an SLF4J bug. See here:<div class=""><a href="https://issues.scala-lang.org/browse/SI-5420" class="">https://issues.scala-lang.org/browse/SI-5420</a></div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 Dec 2014, at 17:30, Elliot Huntington <<a href="mailto:elliot.huntington@gmail.com" class="">elliot.huntington@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">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. <br class=""><br class=""></div><div class="">Please be sure to run the sscce with the following to make sure you're not caching any dependencies:<br class=""><br class=""></div><div class="">$ gradle clean run<br class=""><br class="">------ Here is my environment configuration ------</div></div><br class="">$ uname -a<br class="">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 <br class="">(This is Linux Mint 17 with Cinnamon)<br class=""><br class="">export JAVA_HOME=/home/username/apps/java_home<br class="">export GRADLE_HOME=/home/username/apps/gradle_home<br class="">export SCALA_HOME=/home/username/apps/scala-2.10.3<br class=""><br class="">$ java -version<br class="">java version "1.7.0_55"<br class="">Java(TM) SE Runtime Environment (build 1.7.0_55-b13)<br class="">Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)<br class=""><br class="">$ scala -version<br class="">Scala code runner version 2.10.3 -- Copyright 2002-2013, LAMP/EPFL<br class=""><br class=""></div>$ gradle --version<br class=""><br class="">------------------------------------------------------------<br class="">Gradle 1.12<br class="">------------------------------------------------------------<br class=""><br class="">Build time:   2014-04-29 09:24:31 UTC<br class="">Build number: none<br class="">Revision:     a831fa866d46cbee94e61a09af15f9dd95987421<br class=""><br class="">Groovy:       1.8.6<br class="">Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013<br class="">Ivy:          2.2.0<br class="">JVM:          1.7.0_55 (Oracle Corporation 24.55-b03)<br class="">OS:           Linux 3.13.0-24-generic amd64<br class=""><br class=""><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Dec 15, 2014 at 11:55 PM, Robert Elliot <span dir="ltr" class=""><<a href="mailto:rob@lidalia.org.uk" target="_blank" class="">rob@lidalia.org.uk</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">He's writing Scala - the Scala compiler needs all annotation classes on the compile time class path, unlike javac which doesn't mind them.<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
> On 16 Dec 2014, at 06:24, Ceki Gülcü <<a href="mailto:ceki@qos.ch" class="">ceki@qos.ch</a>> wrote:<br class="">
><br class="">
><br class="">
> I am assuming it's a build time error (not runtime) and you are using gradle. Can you clean gradle cache?<br class="">
><br class="">
>> On 12/16/2014 7:22, Ceki Gülcü wrote:<br class="">
>> Hi Elliot,<br class="">
>><br class="">
>> We added the JSR 305 @Nonnull into ILoggerFactory interface and<br class="">
>> LoggerFactory class in version 1.7.8.<br class="">
>><br class="">
>> I have just verified that client code builds just fine without<br class="">
>> com.google.code.findbugs:jsr305 being present on the class path.<br class="">
>><br class="">
>> Can you tell use more about your build environment. JDK version. Build<br class="">
>> tool etc.<br class="">
>><br class="">
>> Are you doing a clean build?<br class="">
>><br class="">
>> Cheers,<br class="">
>><br class="">
>> --<br class="">
>> Ceki<br class="">
>><br class="">
>>> On 12/15/2014 23:58, Elliot Huntington wrote:<br class="">
>>> slf4j-api version 1.7.8 was released to the maven central repository on<br class="">
>>> 2014-12-14, which was yesterday. Today one of my builds that depended on<br class="">
>>> slf4j-api with a version range from 1.7.5 -> 1.7.8 started to break. I'm<br class="">
>>> getting error messages like this:<br class="">
>>><br class="">
>>> Class javax.annotation.Nonnull not found - continuing with a stub.<br class="">
>>> Caught: java.lang.NullPointerException while parsing annotations in<br class="">
>>> /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)<br class="">
>>><br class="">
>>> error while loading LoggerFactory, class file<br class="">
>>> '/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)'<br class="">
>>><br class="">
>>> is broken<br class="">
>>> (class java.lang.RuntimeException/bad constant pool index: 0 at pos:<br class="">
>>> 9496)<br class="">
>>> /home/username/projects/1.0.5-gradle/common/src/main/scala/company/product/common/LogHelper.scala:14:<br class="">
>>><br class="">
>>> value getLogger is not a member of object org.slf4j.LoggerFactory<br class="">
>>>   lazy val logger = LoggerFactory.getLogger(this.getClass)<br class="">
>>>                                                      ^<br class="">
>>><br class="">
>>> Has getLogger purposefully been removed from the slf4j-api version 1.7.8<br class="">
>>> or is it possible that the artifact uploaded to the maven central<br class="">
>>> repository is corrupted? This is a breaking change.<br class="">
>>><br class="">
>>> After excluding all transitive dependencies to slf4j-api from my project<br class="">
>>> and explicitly using version 1.7.7, my project builds fine again. What<br class="">
>>> happened in version 1.7.8 that was released to the maven central<br class="">
>>> repository yesterday?<br class="">
>>><br class="">
>>><br class="">
>>> _______________________________________________<br class="">
>>> slf4j-user mailing list<br class="">
>>> <a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">
>>> <a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank" class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br class="">
>> _______________________________________________<br class="">
>> slf4j-user mailing list<br class="">
>> <a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">
>> <a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank" class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br class="">
> _______________________________________________<br class="">
> slf4j-user mailing list<br class="">
> <a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">
> <a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank" class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br class="">
_______________________________________________<br class="">
slf4j-user mailing list<br class="">
<a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank" class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a></div></div></blockquote></div></div>
<span id="cid:418D033B-4AFB-4D28-9664-53A5DCCB5A1B@bskyb.com"><sscce.tgz></span>_______________________________________________<br class="">slf4j-user mailing list<br class=""><a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</div></blockquote></div><br class=""></div></div></div></body></html>