[infinispan-dev] REST server war deployment issues

Galder Zamarreno galder at jboss.org
Fri May 21 11:10:34 EDT 2010


https://jira.jboss.org/browse/ISPN-451
https://jira.jboss.org/browse/ISPN-452

----- galder at redhat.com wrote:

> Deploying rest server in Tomcat 6.0.26 throws the exception below.
> 
> It seems like that it can't find slf4j-api jar. Michael, did you try
> the war with any particular tomcat versions?
> 
> I managed to get around the issue by both removing the exclusion in
> the RESTEasy depends and adding slf4j-api and slf4j-simple
> dependencies.
> 
> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at
> org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.<clinit>(ConfigurationBootstrap.java:27)
>         at
> org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:26)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>         at
> org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
>         at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
>         ... 26 more
> 
> As a side note, deploying the original war I tried in a recent AS
> trunk fails with:
> 
> 12:39:58,448 ERROR [[/infinispan-server-rest]] Exception starting
> filter Resteasy: java.lang.ClassCastException:
> org.jboss.resteasy.spi.ResteasyProviderFactory cannot be cast to
> org.jboss.resteasy.spi.ResteasyProviderFactory
> 	at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:55)
> [:]
> 	at
> org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.init(FilterDispatcher.java:39)
> [:]
> 	at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:462)
> [:]
> 	at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3286)
> [:]
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3887)
> [:]
> 
> AS ships with a different version of RESTEasy library which would
> explain this issue (latest AS ships 2.0-beta-2 whereas the war
> includes 1.2.1.GA). However, AFAIR in the past WEB-INF/classes/lib was
> deployed under a different classloader and hence this shouldn't be a
> problem.
> 
> I'll create a couple of JIRAs for these.
> 
> Cheers,
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list