Hi guys,

This is not related to Shiro's support for JBoss environments.  It is due to
multiple class loaders and can occur in any container (App Server/Servlet
Container) that uses multiple classloaders (most do).

You have two slf4j-api.jar files deployed to two different class loaders:

- One is in the JBoss's boot classloader (server/default/lib/*)
- The other is in the sample web application's WEB-INF/lib directory.

Although these two slf4j jar files might be the exact same binary file,
because they are loaded by two different classloaders, the JVM sees their
classes as entirely different - even if their classes have the exact same
package and names.  This is something that has been discussed over and over
again since JEE application servers hit mainstream many years ago.

See these links for more information:

http://www.jboss.org/community/wiki/ClassLoadingConfiguration
http://www.developer.com/java/other/article.php/2248831

The solution to this particular problem is to not deploy any Shiro-related
.jar files to JBoss's server/default/lib directory.  Just deploy the war
file, which should contain everything it needs to run correctly.  If it does
not, please repost to this list, and we can fix how the .war is assembled.

Regards,

Les

On Wed, Jun 24, 2009 at 8:29 PM, elpela <[email protected]> wrote:

>  No I couldn’t, I think it is not fully supported in JBoss.
>
>
>
> Best regards,
>
> Ken
>  ------------------------------
>
> *De:* eyedrop (via Nabble) 
> [mailto:ml-user+240291-594242...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3152418&i=0>]
>
> *Enviado el:* Miércoles, 24 de Junio de 2009 08:26 p.m.
> *Para:* elpela
> *Asunto:* Re: Web Sample - link error
>
>
>
> Did you happen to resolve this?  I am running into this problem as well.
>
> Anyone else seen this error?
>
> Thanks!
>
> *elpela wrote:*
>
> Hi,
>
> I'm trying to run the web-sample in jboss jboss-5.1.0.GA and I'm having
> the following error:
>
> 13:56:21,484 ERROR [0-incubating-SNAPSHOT]] Excepción arrancando filtro
> KiFilter
> java.lang.LinkageError: loader constraint violation: when resolving method
> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
> the class loader (instance of
> org/jboss/classloader/spi/base/BaseClassLoader) of the current class,
> org/slf4j/LoggerFactory, and the class loader (instance of
> org/jboss/classloader/spi/base/BaseClassLoader) for resolved class,
> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type
> org/slf4j/ILoggerFactory used in the signature
>         at
> org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240)
> ...
>
>
> What I have done is:
> maven compiled the hole project.
> I have copied:
>  ki-all-1.0.jar
>  slf4j-api-1.5.6.jar
>  slf4j-log4j12-1.5.6.jar
> to C:\jboss-5.1.0.GA\server\default\lib
>
> and samples-web-1.0-incubating-SNAPSHOT.war to 
> C:\jboss-5.1.0.GA\server\default\deploy
>
>
> What's wrong?
>
> Thanks!
> Ken
>
>
>  ------------------------------
>
> This email is a reply to your post @
> http://n2.nabble.com/Web-Sample---link-error-tp3063237p3152168.html
> You can reply by email or by visting the link above.
>
>
>
> Checked by AVG - www.avg.com
> Version: 8.5.375 / Virus Database: 270.12.90/2199 - Release Date: 06/24/09
> 06:23:00
>
> ------------------------------
> View this message in context: RE: Web Sample - link 
> error<http://n2.nabble.com/Web-Sample---link-error-tp3063237p3152418.html>
>
> Sent from the Shiro User mailing list 
> archive<http://n2.nabble.com/Shiro-User-f582556.html>at Nabble.com.
>

Reply via email to