1
votes

i have an application using spring 3.2.1, gwt 2.4 and hibernate.

This deploys fine in tomcat and runs without errors.

When i try to start a GWT dev mode server for development, the server fails with following error

  Loading modules
     com.my.app.App
        [ERROR] Unexpected error while processing XML
  java.lang.NullPointerException
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:187)
    at org.allcolor.xml.parser.CShaniSaxParser.parseStartTag(CShaniSaxParser.java:1393)
    at org.allcolor.xml.parser.CXmlParser.parseSTARTTag(CXmlParser.java:1405)
    at org.allcolor.xml.parser.CXmlParser.parse(CXmlParser.java:948)
    at org.allcolor.xml.parser.CShaniSaxParser.parse(CShaniSaxParser.java:767)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68)
    at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418)
    at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:296)
    at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:198)
    at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:324)
    at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:156)
    at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:992)
    at com.google.gwt.dev.DevMode.loadModule(DevMode.java:557)
    at com.google.gwt.dev.DevMode.doStartup(DevMode.java:443)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
    at com.google.gwt.dev.DevMode.main(DevMode.java:311)
  [ERROR] shell failed in doStartup method

As far as i can see the xml file is found but the document locator in com.google.gwt.dev.util.xml.ReflectiveParser.java is not set and fail with a NullPointerException when used.

Any ideas what my mistake is?

Thanks Sven

1

1 Answers

1
votes

The problem is that org.allcolor.xml.parser sets itself as the XML parser for javax.xml. If you don't need org.allcolor for client-side code, then remove it from the classpath of the DevMode.

FYI, we have a similar problem with Xerces: HtmlUnit (used to run GWTTestCase tests by default) needs Xerces, but Xerces then registers as an XML parser to the JVM and breaks the module parsing in the same way. We thus have to remove the META-INF from the Xerces JAR.