We collect app.war web application I deploy it on my machine - I get an error. Unfolding neighbor everything works fine.

I change the guava dependency from 13 to 19, everything starts working for me, but the second employee gets the same error that I had with 13 guava.

We take the same app.war, the same Jboss EAP 6 server (completely copied the jboss folder from a neighbor). I have Fedora 24 with Fedora 23.

For colleagues working on Windows, it works in the same way as a neighbor on Fedora 23. I will be grateful to any, the most courageous assumptions.

Critical error during deployment: : java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache; at org.richfaces.resource.ResourceLibraryFactoryImpl.<init>(ResourceLibraryFactoryImpl.java:64) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at org.richfaces.application.DefaultModule.configure(DefaultModule.java:75) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:60) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:110) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:69) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:167) [richfaces-core-4.5.14.Final.jar:4.5.14.Final] at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1] at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2166) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8] at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2139) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8] at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8] at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:601) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8] at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:370) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8] 

    1 answer 1

    Most likely you have several versions of libraries in your project that conflict with each other.

    Try running the application with the -verbose:class flag -verbose:class will display a list of the loaded classes and the name of the jar file from where they come from.

    Next, in maven see which dependencies use this jar archive. This is done with the dependency:tree command. Well, then, just exclude this dependency.

    • Thanks for the answer. Probably through verbose: class it would be possible to learn from which jar guava pulls. But I decided to solve the problem before I could see your answer. I didn’t manage to log 'CacheBuilder.class.getProtectionDomain (). GetCodeSource (). GetLocation ()', because the error occurred almost at the very beginning. But then I added a static initialization block to ejb singleton and the log worked. It turned out that guava was picked up from sisu-guava. Excluded with the <exclusion> tag and it all worked. - Vladimir