0

I'm working on a JSF2, MyFaces and Guava website. Earlier i deployed it on a Glassfish v3 server with no problem. Now i get this strange error when i trying to deploy it on my tomcat 7 server:

YYYY-MMM-DD HH:mm:ss org.apache.catalina.startup.ContextConfig checkHandlesTypes
VARNING: Unable to load class [com.google.common.base.Equivalences$Impl] to check against the @HandlesTypes annotation of one or more ServletContentInitializers.
java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:1988)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1951)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1840)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1808)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1794)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1214)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:828)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5148)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

So far, i know something goes wrong with the Guava library on startup. Has anyone stumbled upon this issue before?

ClydeFrog
  • 912
  • 1
  • 14
  • 38
  • 1
    Sounds like a part of my stack, I had some issue with Guava at one point that I never resolved. I don't recognize the stack but then again I don't remember what issue I had. Then I realized I already had it on the classpath from another framework (was it omnifaces? not sure). So I just removed it. Much later I added it again and had no issues. – Karl Kildén Oct 30 '12 at 14:29
  • You're right Karl. I removed it and now there's no error. I think you're right about the classpath, i wonder what library it already exist in... – ClydeFrog Oct 30 '12 at 14:32
  • In the end I managed to get it to work and I did not remove any other frameworks. My maven artifact now is: com.google.guava guava 13.0.1 – Karl Kildén Oct 30 '12 at 16:49
  • 1
    If you are using Maven, you could execute `mvn dependency:tree | tee dependencies.log` to see if another guava artifact is brought in by transitive dependencies, in which case you can add an exclusion. – Etienne Neveu Oct 30 '12 at 17:22

0 Answers0