My setup is java 1.6.0_45, richfaces 4.3.2, jsf 2.1.5, tomcat 7.0.30, in IntelliJ IDEA 11.
I'm facing the following exception:
java.lang.IllegalArgumentException: duplicate key: class javax.faces.convert.DoubleConverter
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72)
at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:221)
at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:207)
at org.richfaces.javascript.ClientServiceConfigParser.parseConfig(ClientServiceConfigParser.java:54)
...
I have searched here and the closest issues I have found are:
- Here and here
Both posts essentially address the same issue. The csv.xml
file is being referenced in more than one JAR in the /WEB-INF/lib
folder of the project. I wrote a little script to 'jar tf' each of the files in my lib directory piping the output to a grep for csv.xml
and it shows just the one entry.
Here's a screenshot of my /WEB-INF/lib
folder:
Why do I still get this exception and how can I solve it?
My class path being used is as follows:
-classpath "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/deploy.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaws.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jconsole.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management-agent.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/alt-rt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/alt-string.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/data/devl/projects/cannon/register/web/WEB-INF/classes:/data/devl/apache-tomcat-7.0.30/bin/tomcat-juli.jar:/data/devl/apache-tomcat-7.0.30/bin/bootstrap.jar:/data/devl/apache-tomcat-7.0.30/bin/commons-daemon.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-coyote.jar:/data/devl/apache-tomcat-7.0.30/lib/annotations-api.jar:/data/devl/apache-tomcat-7.0.30/lib/el-api.jar:/data/devl/apache-tomcat-7.0.30/lib/jasper-el.jar:/data/devl/apache-tomcat-7.0.30/lib/ecj-3.7.2.jar:/data/devl/apache-tomcat-7.0.30/lib/jasper.jar:/data/devl/apache-tomcat-7.0.30/lib/servlet-api.jar:/data/devl/apache-tomcat-7.0.30/lib/catalina-ha.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-api.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-dbcp.jar:/data/devl/apache-tomcat-7.0.30/lib/jsp-api.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-util.jar:/data/devl/apache-tomcat-7.0.30/lib/catalina.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-jdbc.jar:/data/devl/apache-tomcat-7.0.30/lib/catalina-tribes.jar:/data/devl/apache-tomcat-7.0.30/lib/catalina-ant.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-i18n-es.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-i18n-fr.jar:/data/devl/apache-tomcat-7.0.30/lib/tomcat-i18n-ja.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/commons-beanutils-1.8.3.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/commons-codec-1.3.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/commons-collections-3.2.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/commons-digester-1.8.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/commons-logging-1.1.1.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/cssparser-0.9.5.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/guava-14.0.1.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/javax.faces-2.1.5.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/jhighlight-1.0.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/sac-1.3.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/richfaces-core-api-4.3.2.Final.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/richfaces-core-impl-4.3.2.Final.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/richfaces-components-api-4.3.2.Final.jar:/data/devl/projects/cannon/register/web/WEB-INF/lib/richfaces-components-ui-4.3.2.Final.jar:/Applications/IntelliJ IDEA 11.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.apache.catalina.startup.Bootstrap
start
Just for kicks, I ran my same script to search for 'csv.xml' in all of the included tomcat paths as well, but there were no occurrences. I figured it would be a bit overkill to also run it in the java home location.
I also exported the project to a war and I still have the same issue. I exploded the war file and looked in the /WEB-INF/lib directory to find the following:
This should indicate EXACTLY which jars are being used. And from what I can tell, none of these jar files should have any conflict with the rich faces libraries. I ran my csv.xml search script against this directory and again it came up with exactly one entry.