You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by "Sebastian E. Ovide" <se...@gmail.com> on 2011/01/31 11:59:52 UTC

java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Hi Guys,

I'm getting started with Shiro in a maven project. I've added the filter (as
http://shiro.apache.org/web.html) and the dependencies:

      <!-- Apache Shiro -->
      <dependency>
          <groupId>org.apache.shiro</groupId>
          <artifactId>shiro-core</artifactId>
          <version>${shiroVersion}</version>
      </dependency>

      <dependency>
          <groupId>org.apache.shiro</groupId>
          <artifactId>shiro-web</artifactId>
          <version>${shiroVersion}</version>
      </dependency>

I'm getting this error:

HTTP Status 500 -
------------------------------

*type* Exception report

*message*

*description*The server encountered an internal error () that prevented it
from fulfilling this request.

*exception*

javax.servlet.ServletException: PWC1243: Filter execution threw an exception

*root cause*

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

*root cause*

java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder


ideas ?
-- 
Sebastian E. Ovide

Re: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Posted by f a v <fa...@gmail.com>.
slf4j allows you to choose the logging framework to use. This way, if
you are using log4j, shiro-core doesn't force you to change it to jul,
for example, you just add slf4j-log4j12.jar. Take a look to
http://www.slf4j.org/

On Mon, Jan 31, 2011 at 12:27 PM, Sebastian E. Ovide
<se...@gmail.com> wrote:
> mmm... shouldn't it be already part of shiro-core ?

Re: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Posted by "Sebastian E. Ovide" <se...@gmail.com>.
found it...

I had a dependencyManagement that was messing it up (it came from maven
archetype weld-jsf-jee )

On Mon, Jan 31, 2011 at 3:27 PM, Sebastian E. Ovide <
sebastian.ovide@gmail.com> wrote:

> mmm... shouldn't it be already part of shiro-core ?
>
> by the way I've tried to add this extra dependency and now I'm getting
> another error:
>
>
> HTTP Status 500 -
> ------------------------------
>
> *type* Exception report
>
> *message*
>
> *description*The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> *exception*
>
> javax.servlet.ServletException: PWC1243: Filter execution threw an exception
>
> *root cause*
>
> java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
>
> *note* *The full stack traces of the exception and its root causes are
> available in the GlassFish Server Open Source Edition 3.0.1 logs.*
>
> ideas ?
>
>
>
> On Mon, Jan 31, 2011 at 1:12 PM, f a v <fa...@gmail.com> wrote:
>
>> It needs an appropriate SLF4J binding. Look at
>> http://www.slf4j.org/codes.html#StaticLoggerBinder
>>
>> If you choose logback, for example, you should add something like this
>> to your pom.xml
>>
>> <dependency>
>>        <groupId>ch.qos.logback</groupId>
>>        <artifactId>logback-classic</artifactId>
>>        <version>0.9.27</version>
>>        <scope>runtime</scope>
>> </dependency>
>>
>> On Mon, Jan 31, 2011 at 7:59 AM, Sebastian E. Ovide
>> <se...@gmail.com> wrote:
>> > Hi Guys,
>> >
>> > I'm getting started with Shiro in a maven project. I've added the filter
>> (as
>> > http://shiro.apache.org/web.html) and the dependencies:
>> >
>> > java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
>> >
>> > root cause
>> >
>> > java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
>>
>
>
>
> --
> Sebastian E. Ovide
>
> skype: sebastian.ovide
>
> +353 (0) 87 6340149
>
>
>


-- 
Sebastian E. Ovide

skype: sebastian.ovide

+353 (0) 87 6340149

Re: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Posted by "Sebastian E. Ovide" <se...@gmail.com>.
mmm... shouldn't it be already part of shiro-core ?

by the way I've tried to add this extra dependency and now I'm getting
another error:

HTTP Status 500 -
------------------------------

*type* Exception report

*message*

*description*The server encountered an internal error () that prevented it
from fulfilling this request.

*exception*

javax.servlet.ServletException: PWC1243: Filter execution threw an exception

*root cause*

java.lang.NoSuchMethodError:
org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;

*note* *The full stack traces of the exception and its root causes are
available in the GlassFish Server Open Source Edition 3.0.1 logs.*

ideas ?


On Mon, Jan 31, 2011 at 1:12 PM, f a v <fa...@gmail.com> wrote:

> It needs an appropriate SLF4J binding. Look at
> http://www.slf4j.org/codes.html#StaticLoggerBinder
>
> If you choose logback, for example, you should add something like this
> to your pom.xml
>
> <dependency>
>        <groupId>ch.qos.logback</groupId>
>        <artifactId>logback-classic</artifactId>
>        <version>0.9.27</version>
>        <scope>runtime</scope>
> </dependency>
>
> On Mon, Jan 31, 2011 at 7:59 AM, Sebastian E. Ovide
> <se...@gmail.com> wrote:
> > Hi Guys,
> >
> > I'm getting started with Shiro in a maven project. I've added the filter
> (as
> > http://shiro.apache.org/web.html) and the dependencies:
> >
> > java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
> >
> > root cause
> >
> > java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
>



-- 
Sebastian E. Ovide

skype: sebastian.ovide

+353 (0) 87 6340149

Re: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Posted by f a v <fa...@gmail.com>.
It needs an appropriate SLF4J binding. Look at
http://www.slf4j.org/codes.html#StaticLoggerBinder

If you choose logback, for example, you should add something like this
to your pom.xml

<dependency>
	<groupId>ch.qos.logback</groupId>
	<artifactId>logback-classic</artifactId>
	<version>0.9.27</version>
	<scope>runtime</scope>
</dependency>

On Mon, Jan 31, 2011 at 7:59 AM, Sebastian E. Ovide
<se...@gmail.com> wrote:
> Hi Guys,
>
> I'm getting started with Shiro in a maven project. I've added the filter (as
> http://shiro.apache.org/web.html) and the dependencies:
>
> java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
>
> root cause
>
> java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder