12
votes

I have IntelliJ Idea 12 and Jetty 9 on my Windows 7 machine.

I also have a sample JSF project which runs fine on Tomcat 7.0. When I try adding a runtime with Jetty, I get the error:

Duplicate config file paths found

When I remove

etc\jetty-jmx.xml

from Jetty Server Settings on this screen, I do not get this error but when I try starting the project, then I get:

2013-03-27 17:50:42.076:WARN:oejx.XmlParser:main: FATAL@file:/D:/Jetty-9/start.d/ line:1 col:1 : org.xml.sax.SAXParseException; systemId: file:/D:/Jetty-9/start.d/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.jetty.start.Main.invokeMain(Main.java:453) at org.eclipse.jetty.start.Main.start(Main.java:595) at org.eclipse.jetty.start.Main.main(Main.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/Jetty-9/start.d/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:996) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302) at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:204) at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:220) at org.eclipse.jetty.xml.XmlConfiguration.(XmlConfiguration.java:138) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1209) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1160) ... 12 more

Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information

So, how to configure Jetty properly on IntelliJ 12?

2
Did you check my comment?CrazyCoder
This has been answered already by @CrazyCoder in a different question asked by you.Joakim Erdfelt
Could it be that your .xml is malformed? Maybe it has a starting space or a BOM?zpontikas

2 Answers

2
votes

I had the same problem, but resolved it this way on Intellij 2016.2.5 and Jetty 9.3.13

Be default in start.ini the following modules are Enabled

--module=ext
--module=resources
--module=server
--module=http
--module=deploy
--module=jsp
--module=websocket

And when i was Configuring Jetty in IntelliJ, i was adding some of the above to "Jetty Server Settings" section again, and so the error.

Only add "modules/jmx.mod"

enter image description here

Solution is to add the modules either here (IntelliJ > Run > Edit Configurations > Jetty server > local ) or in the "start.ini" file.

0
votes

So far I know, Idea 12 do not support Jetty 9. That's all.