title: java.lang.IllegalArgumentException: Multiple entries with same key: interface javax.validation.constraints.Min
body: <p>I'm running an EAR with EJB + EJB + WAR deployment in JBoss WildFly 8.2.0.Final with JSF 2.2 and RichFaces 4.5.2.Final. My problem is, that all RichFaces resources fail to load properly in the client. The generated URL don't resolve and return with HTTP 404.</p>
  
  <p>The deployment is build upon Maven und results in the following structure:</p>
  
  <p><img src="https://i.stack.imgur.com/N96LT.png" alt="enter image description here"></p>
  
  <p>The reason for using <code>&lt;scope&gt;compile&lt;/scope&gt;</code> in the EJB module and not the WAR is that I need to extend RichFaces classes from within my EJB module. We've build a dynamic form generator based on some of the components.</p>
  
  <p>As soon as I add JARs to <code>EAR/lib/</code> and <code>WAR/WEB-INF/lib/</code> by using <code>&lt;scope&gt;compile&lt;/scope&gt;</code> instead of <code>&lt;scope&gt;provided&lt;/scope&gt;</code> in the WAR module I get the following stacktrace while starting the application server:</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Multiple entries with same key: interface javax.validation.constraints.Min=org.richfaces.javascript.LibraryFunctionImplementation@c77af4e and interface javax.validation.constraints.Min=org.richfaces.javascript.LibraryFunctionImplementation@5a903150
      at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150)
      at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104)
      at com.google.common.collect.RegularImmutableMap.&lt;init&gt;(RegularImmutableMap.java:70)
      at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254)
      at org.richfaces.javascript.ClientServiceConfigParser.parseConfig(ClientServiceConfigParser.java:75)
      at org.richfaces.application.ValidatorModule.createClientScriptService(ValidatorModule.java:65)
      at org.richfaces.application.ValidatorModule.configure(ValidatorModule.java:60)
      at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:60)
      at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:110)
      at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:69)
      at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:167)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
      at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2190)
      at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
      at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:294)
      at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:692)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:260)
      ... 9 more
  </code></pre>
  
  <p>How can I solve this problem?</p>