当我尝试在服务器上运行我的应用时,我遇到以下错误:
Error:GWT Compiler: Element 'extend-property' beginning on line 27 contains unexpected attribute 'fallback-value'
Error:GWT Compiler: Failure while parsing XML
Error:GWT Compiler: at com.google.gwt.dev.util.xml.DefaultSchema.onUnexpectedAttribute(DefaultSchema.java:68)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.Schema.onUnexpectedAttribute(Schema.java:80)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:224)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1303)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:327)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
Error:GWT Compiler: at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
Error:GWT Compiler: at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:354)
Error:GWT Compiler: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:GWT Compiler: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error:GWT Compiler: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:GWT Compiler: at java.lang.reflect.Method.invoke(Method.java:601)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:223)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:270)
Error:GWT Compiler: at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:766)
Error:GWT Compiler: at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
Error:GWT Compiler: at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
Error:GWT Compiler: at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
Error:GWT Compiler: at com.google.gwt.dev.Compiler.run(Compiler.java:184)
Error:GWT Compiler: at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
Error:GWT Compiler: at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
Error:GWT Compiler: at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
Error:GWT Compiler: at com.google.gwt.dev.Compiler.main(Compiler.java:159)
Error:GWT Compiler: Unexpected error while processing XML
Error:GWT Compiler: at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:351)
Error:GWT Compiler: Unexpected exception while processing element 'inherits'
Error:GWT Compiler: at com.google.gwt.dev.util.xml.DefaultSchema.onHandlerException(DefaultSchema.java:56)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)
Error:GWT Compiler: at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:233)
我猜这些都是由maven引起的,所以这里是pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.messagedna.dlp</groupId>
<artifactId>DLPServer</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>DLPServer</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>com.extjs</groupId>
<artifactId>gxt</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-mime4j</artifactId>
<version>0.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>net.freeutils.jtnef</groupId>
<artifactId>tnef</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.messagedna-archive.mimeparser</groupId>
<artifactId>MimeParser</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<outputDirectory>war/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<runTarget>Main.html</runTarget>
<style>OBFUSCATED</style>
<extraJvmArgs>-Xmx1024m -Xss1024k</extraJvmArgs>
<webappDirectory>war</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webappDirectory>war</webappDirectory>
<warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
每当我尝试在谷歌搜索时,我都没有找到解决方案,有些问题部分是这样的,但它们没有任何解决方案。
所以,请看看这个,如果你能提出任何方法来解决这个问题,我会非常感激。
答案 0 :(得分:2)
来自GWT编译器的错误,它可能与maven无关,而是与GWT XML配置文件(如UIBinder文件)无关。
该消息告诉您在不期望的地方使用了名为“extend-property”的属性。因此,在项目中查找此属性。如果它实际上位于UIBinder XML文件中,请记住,XML元素的属性名称必须与相应java类中的属性名称相同(因此可能没有连字符)。
答案 1 :(得分:1)
问题在于它来自gwt-sdk的gwt-user和依赖项添加的另一个gwt-user