3 Replies Latest reply on Jul 24, 2012 7:51 AM by intellectual_tortoise

    Multiple csv.xml files causing "error occured while initializing MyFaces: duplicate key:"

    intellectual_tortoise Newbie

      My issue is a follows:  I'm getting the following error when starting my app:


      SEVERE: An error occured while initializing MyFaces: duplicate key: class javax.faces.convert.IntegerConverter

      java.lang.IllegalArgumentException: duplicate key: class javax.faces.convert.IntegerConverter


      I have tracked it down this far:  both richfaces-components-ui-4.2.2.Final.jar and richfaces-ui-validator-ui-4.2.2.Final.jar contain a file META-INF/csv.xml which defines this converter (and others).


      In my Maven pom.xml I have (after pre-declaring the 4.2.2Final BOM):














      And this issue only appeared when I added richfaces-ui-validator-ui (which I had to get from https://repository.jboss.org/nexus/content/repositories/releases because it's not in Maven Central ... why not, I wonder???).


      Prior to adding validator-ui, I coudn't load pages with rich:ajaxValidation tags because of this error:

      <rich:ajaxValidator> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: ajaxValidator


      My guess is that this error is due to either my own configuration error (as a RichFaces noob) or a deployment issue where the csv.xml packaged in JAR for which it was never intended.


      Can anyone tell me which is the case?