tags:

views:

315

answers:

0

Once I add the crimson.jar file to the WEB-INF/lib folder my GWT compilation doesn't work anymore.

See the output of my ANT GWT compilation target.

gwtc:
 [echo] You can use -style OBF | PRETTY | DETAILED to generate default | debuggable | verbose GWT javascript
 [java] [ERROR] Failure while parsing XML
 [java] org.xml.sax.SAXNotRecognizedException: Feature: http://apache.org/xml/features/nonvalidating/load-external-dtd
 [java]     at org.apache.crimson.parser.XMLReaderImpl.setFeature(XMLReaderImpl.java:213)
 [java]     at org.apache.crimson.jaxp.SAXParserImpl.setFeatures(SAXParserImpl.java:143)
 [java]     at org.apache.crimson.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:126)
 [java]     at org.apache.crimson.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:113)
 [java]     at org.apache.crimson.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:141)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:320)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
 [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:184)
 [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
 [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
 [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
 [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:159)
 [java] [ERROR] Unexpected error while processing XML
 [java] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:351)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
 [java]     at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
 [java]     at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
 [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:184)
 [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
 [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
 [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
 [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:159)

It looks like the GWT compiler is using crimson instead of some other parser to read an XML file used in the compilation. What parser is it using?

Apparently if I add xerces.jar before crimson.jar in the classpath it will work. But which one is it using now and how can I make it be before crimson in the classpath?