【发布时间】:2015-01-14 17:35:11
【问题描述】:
我试图将谷歌地图集成到一个应用程序中,但是用 maven 编译 googlemaps 插件对我来说是一个真正的痛苦。我关注了很多关于这个问题的帖子,但似乎没有任何效果。我将 pom.xml 配置如下:
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions>
<execution>
<configuration>
</configuration>
<goals>
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
此外,我创建了 my_project_nameWidgetSet.gwt.xml 并在我运行 vaadin:compile 后生成了必要的行,如下所示:
<module>
<inherits name="com.vaadin.DefaultWidgetSet" />
<inherits name="com.vaadin.tapio.googlemaps.Widgetset" />
</module>
但是它无法生成客户端 javascript 文件,并且一遍又一遍地发生相同的异常:
Loading inherited module 'com.sensormatic.gpstracking.widgetset.GpsTrackingWidgetset'
[INFO] Loading inherited module 'com.vaadin.tapio.googlemaps.Widgetset'
[INFO] [ERROR] Line 3: Unexpected exception while processing element 'inherits'
[INFO] java.lang.NullPointerException
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:324)
[INFO] at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:502)
[INFO] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:483)
[INFO] at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[INFO] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[INFO] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[INFO] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:374)
[INFO] at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:502)
[INFO] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:483)
[INFO] at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[INFO] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[INFO] at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[INFO] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[INFO] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68)
[INFO] at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:374)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:288)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:231)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:160)
[INFO] at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:135)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:130)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:100)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:107)
[INFO] [ERROR] Failure while parsing XML
[INFO] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
有谁知道这个异常是什么以及我最终如何解决它?
【问题讨论】:
标签: eclipse google-maps maven gwt vaadin