开发者社区> 问答> 正文

Duplicate config file paths found:配置报错 

在 IntelliJ IDEA 中 配置 Jetty9 出现 Duplicate config file paths found

在 IDEA 中 配置 Jetty9 的时候 会 出现 "Duplicate config file paths found",但是安装 提示 取消 etc\jeety-jmx.xml 之后,虽然不会提示错误了,但是 配置完 之后 也是无法启动 jetty 的,会报错 "Could not find the main class: duplicate.  Program will exit."
这具体是为什么呢?

取消选择 etc\jetty-jxm.xml之后 启动 会报错,而不取消根本无法保存配置

"C:\Program Files\Java\jdk1.6.0_45\bin\java" -DSTOP.PORT=0 -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DOPTIONS=jmx -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:\CodeProgram\IntelliJ IDEA 11.1.5\bin" duplicate -Dfile.encoding=GBK -classpath "start.jar;D:\CodeProgram\IntelliJ IDEA 11.1.5\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.eclipse.jetty.start.Main "C:\Documents and Settings\Administrator\Local Settings\temp\context1942389928663380414config\contexts-config.xml" java.lang.NoClassDefFoundError: duplicate Caused by: java.lang.ClassNotFoundException: duplicate at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: duplicate.  Program will exit. [2013-10-18 06:12:50,375] Artifact BaeTest:war exploded: Server is not connected. Press 'Deploy' to start deployment. Exception in thread "main" Disconnected from server

Google 搜索了好久,就stackoverflow上面有两个提问。。。。而且还没人回答,真是个天坑呀。。。。

展开
收起
kun坤 2020-05-31 22:59:31 1308 0
1 条回答
写回答
取消 提交回答
  • 没有人知道么?  ######这个问题我也遇到了,琢磨了一下解决了。

    首先你可能把jetty server设置乱了,需要在IntelliJ里删掉现有的Jetty Template。下载新的Jetty放到新目录。然后将default里的Jetty Server指向新的目录,注意:点击”configure。。。“,里面缺省会有四个xml是active的。所以在run/deploy的对话框里不需要再选中active任何xml,否则就会报错duplicate config file found。指向新的目录以后,default jetty server不需要做任何修改了,你得到了一个新的default jetty server,按+号重新做一个针对app的jetty server,选中新建的default jetty server做模板,不需要active任何xml,只需要设置startpage指向project name,同时deploy你的war exploded。就设置好了。可以运行app了。######不要选择多个mod配置,默认的就是第一个###### 没想到这个问题现在还存在。 ######JMX 端口下面有一堆的xml文件 ,选中其中一个jetty-jmx.xml的文件就OK

    2020-05-31 22:59:37
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Borgaonkar-New-Adventures-In-Spying-3G-And-4G-Users-Locate-Track-And-Monitor 立即下载
Why you should care about data layout in the file system 立即下载
How to Build a Successful Data 立即下载