开发者

GWT favicon.ico returning error!(GWT and Java)

My program, (Basically the GWT Sample Code, except with different headers and names) was working perfect - until I added a favicon.ICO file and <link rel="icon" href="favicon.ico" type="image/x-icon" />! Now my program returns:

[WARN] Unable to process '.../war/WEB-INF/web.xm开发者_JAVA技巧l' for servlet validation

org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/nonvalidating/load-external-dtd
    at gnu.xml.aelfred2.JAXPFactory.setFeature(JAXPFactory.java:102)
    at com.google.gwt.dev.ServletValidator.create(ServletValidator.java:188)
    at com.google.gwt.dev.ServletValidator.create(ServletValidator.java:172)
    ...

[ERROR] Failure while parsing XML

org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/nonvalidating/load-external-dtd
    at gnu.xml.aelfred2.JAXPFactory.setFeature(JAXPFactory.java:102)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:324)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
    ...

[ERROR] Unexpected error while processing XML

com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:355)
    at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
    at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)

[ERROR] shell failed in doStartup method

I have now removed favicon.ICO, and my program is still returning the same error!

Is the problem with the code, or with the favicon? I am using the GWT Eclipse Plugin

I am REALLY confused!!! Can any body please help me?


gnu.xml.aelfred2 in the stacktrace rings a bell: have you changed anything to your classpath? or put gnujaxp.jar in your $JAVA_HOME/jre/lib/ext? (see http://www.gnu.org/software/classpathx/jaxp/) or switched JRE/JDK?

It's clear that GWT thinks it's talking to Apache Xerces (which BTW is the Reference Implementation for JAXP, and the one included in the Sun/Oracle JRE/JDK and in OpenJDK), but your JVM gives it a GNU Ælfred2 implementation instead.
Additionally, gwt-dev.jar bundles Xerces, so the only reason you're using Ælfred2 is because of a classpath or boot-classpath issue.


It seems that GWT cannot find xerces. I had the same problem but couldn't find gnujaxp.jar on my classpath. I dropped xercesImpl-2.6.2.jar into the web-inf/lib folder and it started working.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜