2 Replies Latest reply on Jun 11, 2014 5:34 AM by vbiertho

    Richfaces 4.3.6 crash with Guava >=15.0

    vbiertho Newbie

      Hi,

      When using RichFace 4.3.6 (or lower) with a recent Google Guava version, an IllegalAccessError occur.

      Here a JBoss EAP 6.2.2 log:

      14:12:44,062 SEVERE () [javax.enterprise.resource.webcontainer.jsf.config] Critical error during deployment: : java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
        at org.richfaces.resource.ResourceLibraryFactoryImpl.<init>(ResourceLibraryFactoryImpl.java:44) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at org.richfaces.application.DefaultModule.configure(DefaultModule.java:42) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:27) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:130) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:68) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:152) [richfaces-core-impl-4.3.6.Final.jar:4.3.6.Final]
        at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) [jboss-jsf-api_2.1_spec-2.1.27.Final-redhat-1.jar:2.1.27.Final-redhat-1]
        at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2163) [jsf-impl-2.1.27.redhat-8.jar:]
        at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2139) [jsf-impl-2.1.27.redhat-8.jar:]
        at com.sun.faces.application.ApplicationImpl.__publishEvent(ApplicationImpl.java:303) [jsf-impl-2.1.27.redhat-8.jar:]
        at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java) [jsf-impl-2.1.27.redhat-8.jar:]
        at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
        at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:683) [jboss-jsf-api_2.1_spec-2.1.27.Final-redhat-1.jar:2.1.27.Final-redhat-1]
        at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:601) [jsf-impl-2.1.27.redhat-8.jar:2.1.27.redhat-8]
        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:370) [jsf-impl-2.1.27.redhat-8.jar:2.1.27.redhat-8]
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216) [jsf-impl-2.1.27.redhat-8.jar:2.1.27.redhat-8]
        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.3.1.Final-redhat-1.jar:7.3.1.Final-redhat-1]
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.3.1.Final-redhat-1.jar:7.3.1.Final-redhat-1]
        at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
        at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
        at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      
      

       

       

      The MapMaker.makeComputingMap method was indeed marked deprecated a while ago. The method goes from public to default scope in Guava 1.14.0

      It's therefore impossible to use a recent version of Guava in the same package...

       

      A Migration guide exist.: http://code.google.com/p/guava-libraries/wiki/MapMakerMigration

      Could you please consider a 4.3.7 version with a fix?

      Thx.