googleMaps widgesets compilation failed

Hi all,

I’m new to vaadin . I’m trying to use google maps add-on , so I’ve downloaded the jar gwt-maps-api-3.10.0-alpha-7.jar , and put in my .gwt.xml file this guy :

But when I try to compile widgesets I got :

[code]
Loading inherited module ‘com.example.meteoapp.widgetset.MeteoappWidgetset’

Loading inherited module ‘org.vaadin.jouni.animator.AnimatorWidgetset’

  [ERROR]

Line 30: Unexpected exception while processing element ‘inherits’

java.lang.NullPointerException

at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:324)

at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:502)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)

at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

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:374)

at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:502)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)

at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

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:374)

at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:288)

at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:231)

at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:160)

at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:135)

at com.google.gwt.dev.Compiler.run(Compiler.java:130)

at com.google.gwt.dev.Compiler$1.run(Compiler.java:100)

at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)

at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)

at com.google.gwt.dev.Compiler.main(Compiler.java:107)

at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:80)

at java.lang.Thread.run(Thread.java:744)

  [ERROR]

Failure while parsing XML
[/code]Any help with that ? Thanks ! Cheers

Instead of inheriting [font=courier new]
com.google.gwt.maps.Maps[font=arial]

[/font]
[/font]directly you should inherit the widgetset of the add-on, resulting to a
Widgetset.gwt.xml
looking like this:

[code]

<?xml version="1.0" encoding="UTF-8"?> [/code]Also notice that the widgetset compiler should find these dependencies and adds them automatically to your widgetset. Thefore you don't have to add them manually.

Hi , at first thanks for reply . I’ve change my gwt.xml as u suggest but still the same error . What am I doing wrong ?

Cheers

Anyone ?

There’s probably still a typo somewhere in your widgetset.gwt.xml. Could you post your file here so that we could take a look?

Sure , it’s :

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">

<module>

    <inherits name="com.vaadin.DefaultWidgetSet" />

    <inherits name="com.vaadin.tapio.googlemaps.Widgetset" />




    <inherits name="org.vaadin.jouni.animator.AnimatorWidgetset" />




    <inherits name="com.wildboar.vaadin.addon.googlemap.GoogleMapWidgetset" />




    <inherits name="com.github.wolfie.refresher.RefresherWidgetset" />

</module>

Umm whats “com.wildboar.vaadin.addon.googlemap.GoogleMapWidgetset” and why you’re using it?

Sorry I’m a true begginer in vaadin - delete that ?

It seems to be the widget set definition of GoogleMapWidgetV3" which is Google Maps implementation for Vaadin 6. You should use either my
Google Maps Add-on
if you’re using Vaadin 7 OR
GoogleMapWidgetV3
with Vaadin 6.

Ok thanks . So how can I run any sample code using ur add-on in Vaadin 7 ? Just download the jar “googlemaps-1.0.0” and what should I fill in widgetset.gwt.xml then ? Could u send me some sample code for me to test is it working correctly ? Cheers

My example application is available in
GitHub
.

Ok thanks , I will try to run it and see what’s going on .

I’ve download ur example but still compilation failed when try to compile widgetset . Could you please take a look on my project ? Thanks a lot ,

Cheers
17436.zip (3.24 MB)

First problem is that you have some really old Vaadin jars in your lib folder. None of them are needed since Vaadin dependencies are handled by Ivy automatically.

Secondly, if you want to use Google Maps Add-on without dependency management, you also need to add GWT-Maps-V3-Api manually to your lib folder. Instead of doing that, I’d also remove
googlemaps-1.0.0.jar
from the project and add



to your
ivy.xml
, leaving the lib folder empty. After doing that the widget set seems to compile fine.

Hi thanks, I did that and now widgeset compiling fine but still can’t run the main class . I attached you logs
17437.rtf (10 KB)

You should change the
widgetset
parameter used in
@VaadinServletConfiguration
annotation to match with the actual widgetset used in your project,
com.example.googlemaps.widgetset.GooglemapsWidgetset
, not the one used in my demo.

Thanks a lot , now it’s working ! :))))))