You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-dev@incubator.apache.org by Subash Chaturanga <su...@gmail.com> on 2011/07/10 05:07:54 UTC

Suggestion to go for a higher version of SLF4J

Hi devs,

When I wrote a test class for Generic Face Recognition I got the following
Exception in runtime,
*Exception in thread "main" java.lang.IllegalAccessError: tried to access
field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
org.slf4j.LoggerFactory*

This is because, the slf4j-api distribution having different implementations
of StaticLoggerBinder  to one in the slf4j implementation JARs. So to skip
this and gt this done, we need to include the slfj4 -api dependency as well.
And also I saw in a forum saying this doesn't work for versions below 1.5.5
or 6.
So I tried by having dependencies of the version 1.5.8 in both api and impl
of slf4j (having priority to the API ) and it worked, but didn't worked for
1.5.3 (which we currently have) and trunk also builds with the new pom.

        <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>1.5.8</version>
       </dependency>

<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-log4j12</artifactId>
  <version>1.5.8</version>
</dependency>

  So Shall we go ahead with 1.5.8 ?  WDYT ?

-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: Suggestion to go for a higher version of SLF4J

Posted by Subash Chaturanga <su...@gmail.com>.
On Sun, Jul 10, 2011 at 11:55 PM, Luciano Resende <lu...@gmail.com>wrote:

> On Sun, Jul 10, 2011 at 3:44 AM, Subash Chaturanga <su...@gmail.com>
> wrote:
> > On Sun, Jul 10, 2011 at 3:01 PM, Luciano Resende <luckbr1975@gmail.com
> >wrote:
> >
> >> On Sat, Jul 9, 2011 at 10:07 PM, Subash Chaturanga <subashsdm@gmail.com
> >
> >> wrote:
> >> > Hi devs,
> >> >
> >> > When I wrote a test class for Generic Face Recognition I got the
> >> following
> >> > Exception in runtime,
> >> > *Exception in thread "main" java.lang.IllegalAccessError: tried to
> access
> >> > field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
> >> > org.slf4j.LoggerFactory*
> >> >
> >> > This is because, the slf4j-api distribution having different
> >> implementations
> >> > of StaticLoggerBinder  to one in the slf4j implementation JARs. So to
> >> skip
> >> > this and gt this done, we need to include the slfj4 -api dependency as
> >> well.
> >> > And also I saw in a forum saying this doesn't work for versions below
> >> 1.5.5
> >> > or 6.
> >> > So I tried by having dependencies of the version 1.5.8 in both api and
> >> impl
> >> > of slf4j (having priority to the API ) and it worked, but didn't
> worked
> >> for
> >> > 1.5.3 (which we currently have) and trunk also builds with the new
> pom.
> >> >
> >> >        <dependency>
> >> >         <groupId>org.slf4j</groupId>
> >> >         <artifactId>slf4j-api</artifactId>
> >> >         <version>1.5.8</version>
> >> >       </dependency>
> >> >
> >> > <dependency>
> >> >  <groupId>org.slf4j</groupId>
> >> >  <artifactId>slf4j-log4j12</artifactId>
> >> >  <version>1.5.8</version>
> >> > </dependency>
> >> >
> >> >  So Shall we go ahead with 1.5.8 ?  WDYT ?
> >>
> >> How about we move to the latest one, which is 1.6.1 ?
> >
> >
> > Hi Luciano, I am getting some Exceptions of NoSuchMethodError from face4j
> in
> > 1.6.1 and 1.6.0(but i don't know the reason). There is no version called
> > 1.5.9.
> > But 1.5.8 works fine. WDYT?
> >
> >
>
> +1 then.
>

+1 and I will commit the test case and the changed pom.

>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>



-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: Suggestion to go for a higher version of SLF4J

Posted by Luciano Resende <lu...@gmail.com>.
On Sun, Jul 10, 2011 at 3:44 AM, Subash Chaturanga <su...@gmail.com> wrote:
> On Sun, Jul 10, 2011 at 3:01 PM, Luciano Resende <lu...@gmail.com>wrote:
>
>> On Sat, Jul 9, 2011 at 10:07 PM, Subash Chaturanga <su...@gmail.com>
>> wrote:
>> > Hi devs,
>> >
>> > When I wrote a test class for Generic Face Recognition I got the
>> following
>> > Exception in runtime,
>> > *Exception in thread "main" java.lang.IllegalAccessError: tried to access
>> > field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
>> > org.slf4j.LoggerFactory*
>> >
>> > This is because, the slf4j-api distribution having different
>> implementations
>> > of StaticLoggerBinder  to one in the slf4j implementation JARs. So to
>> skip
>> > this and gt this done, we need to include the slfj4 -api dependency as
>> well.
>> > And also I saw in a forum saying this doesn't work for versions below
>> 1.5.5
>> > or 6.
>> > So I tried by having dependencies of the version 1.5.8 in both api and
>> impl
>> > of slf4j (having priority to the API ) and it worked, but didn't worked
>> for
>> > 1.5.3 (which we currently have) and trunk also builds with the new pom.
>> >
>> >        <dependency>
>> >         <groupId>org.slf4j</groupId>
>> >         <artifactId>slf4j-api</artifactId>
>> >         <version>1.5.8</version>
>> >       </dependency>
>> >
>> > <dependency>
>> >  <groupId>org.slf4j</groupId>
>> >  <artifactId>slf4j-log4j12</artifactId>
>> >  <version>1.5.8</version>
>> > </dependency>
>> >
>> >  So Shall we go ahead with 1.5.8 ?  WDYT ?
>>
>> How about we move to the latest one, which is 1.6.1 ?
>
>
> Hi Luciano, I am getting some Exceptions of NoSuchMethodError from face4j in
> 1.6.1 and 1.6.0(but i don't know the reason). There is no version called
> 1.5.9.
> But 1.5.8 works fine. WDYT?
>
>

+1 then.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Suggestion to go for a higher version of SLF4J

Posted by Subash Chaturanga <su...@gmail.com>.
On Sun, Jul 10, 2011 at 3:01 PM, Luciano Resende <lu...@gmail.com>wrote:

> On Sat, Jul 9, 2011 at 10:07 PM, Subash Chaturanga <su...@gmail.com>
> wrote:
> > Hi devs,
> >
> > When I wrote a test class for Generic Face Recognition I got the
> following
> > Exception in runtime,
> > *Exception in thread "main" java.lang.IllegalAccessError: tried to access
> > field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
> > org.slf4j.LoggerFactory*
> >
> > This is because, the slf4j-api distribution having different
> implementations
> > of StaticLoggerBinder  to one in the slf4j implementation JARs. So to
> skip
> > this and gt this done, we need to include the slfj4 -api dependency as
> well.
> > And also I saw in a forum saying this doesn't work for versions below
> 1.5.5
> > or 6.
> > So I tried by having dependencies of the version 1.5.8 in both api and
> impl
> > of slf4j (having priority to the API ) and it worked, but didn't worked
> for
> > 1.5.3 (which we currently have) and trunk also builds with the new pom.
> >
> >        <dependency>
> >         <groupId>org.slf4j</groupId>
> >         <artifactId>slf4j-api</artifactId>
> >         <version>1.5.8</version>
> >       </dependency>
> >
> > <dependency>
> >  <groupId>org.slf4j</groupId>
> >  <artifactId>slf4j-log4j12</artifactId>
> >  <version>1.5.8</version>
> > </dependency>
> >
> >  So Shall we go ahead with 1.5.8 ?  WDYT ?
>
> How about we move to the latest one, which is 1.6.1 ?


Hi Luciano, I am getting some Exceptions of NoSuchMethodError from face4j in
1.6.1 and 1.6.0(but i don't know the reason). There is no version called
1.5.9.
But 1.5.8 works fine. WDYT?


>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>



-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: Suggestion to go for a higher version of SLF4J

Posted by Luciano Resende <lu...@gmail.com>.
On Sat, Jul 9, 2011 at 10:07 PM, Subash Chaturanga <su...@gmail.com> wrote:
> Hi devs,
>
> When I wrote a test class for Generic Face Recognition I got the following
> Exception in runtime,
> *Exception in thread "main" java.lang.IllegalAccessError: tried to access
> field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
> org.slf4j.LoggerFactory*
>
> This is because, the slf4j-api distribution having different implementations
> of StaticLoggerBinder  to one in the slf4j implementation JARs. So to skip
> this and gt this done, we need to include the slfj4 -api dependency as well.
> And also I saw in a forum saying this doesn't work for versions below 1.5.5
> or 6.
> So I tried by having dependencies of the version 1.5.8 in both api and impl
> of slf4j (having priority to the API ) and it worked, but didn't worked for
> 1.5.3 (which we currently have) and trunk also builds with the new pom.
>
>        <dependency>
>         <groupId>org.slf4j</groupId>
>         <artifactId>slf4j-api</artifactId>
>         <version>1.5.8</version>
>       </dependency>
>
> <dependency>
>  <groupId>org.slf4j</groupId>
>  <artifactId>slf4j-log4j12</artifactId>
>  <version>1.5.8</version>
> </dependency>
>
>  So Shall we go ahead with 1.5.8 ?  WDYT ?

How about we move to the latest one, which is 1.6.1 ?

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/