Parsing error on .gwt.xml file when including Maps script

266 views
Skip to first unread message

andrew

unread,
Apr 7, 2010, 2:11:20 PM4/7/10
to Google API Libraries for GWT
all the Maps examples and documents I can find explain how to "Adding
the Maps script tag to your module XML file", thus:

script src="http://maps.google.com/maps?
gwt=1&file=api&v=2&key=???"

When I do this (using a real key) I get the following GWT errors:

[Fatal Error] :30:54: The reference to entity "file" must end with the
';' delimiter.
[ERROR] Failure while parsing XML
org.xml.sax.SAXParseException: The reference to entity "file" must end
with the ';' delimiter.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
--- deleted lines ---
[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:351)

After searching, I found a workaround, with LOTS of & escapes....
leading to this...

<script src="http://maps.google.com/maps?
gwt=1&amp;amp;amp;file=api&amp;amp;amp;v=2&amp;amp;amp;sensor=false&amp;amp;amp;key=???" /
>


It works, so who cares?

Well I wonder if it's related to the Map problems I have, and the fact
that the page/script causes problems in FireFox and IE, saying that
the Maps API is not available...

Thanks for hints.

Eric Ayers

unread,
Apr 7, 2010, 3:11:17 PM4/7/10
to gwt-goo...@googlegroups.com
What version of GWT are you using? If you are using a version
compiled straight out of trunk, I recommend you either roll up to the
latest tip of trunk, or back down to the GWT 2.0.3 production release
due to some caching issues when developing in hosted mode.

I'm doing OK with:

http://maps.google.com/maps?gwt=1&amp;file=api&amp;v=2&amp;key=???

I can replicate your error when I change the URL query string to

http://maps.google.com/maps?gwt=1&file=api&v=2&key=???

was it just a typo?

> --
> You are subscribed to the Google Groups "GWT-Google-Apis" group.
> For more options, visit http://groups.google.com/group/gwt-google-apis?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

--
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

andrew

unread,
Apr 7, 2010, 3:43:07 PM4/7/10
to Google API Libraries for GWT
I'm using GWT 2.03 as installed by Eclipse, nothing unusual.

I can't see the difference between the two URL query strings you've
posted!

andrew

unread,
Apr 7, 2010, 3:51:07 PM4/7/10
to Google API Libraries for GWT
I checked and it seemed that Eclipse had 2.0.2 AND 2.0.3 installed,
i.e. the updated didn't remove the previous version.

So I removed 2.0.2 and restarted.

Now GWT Compiling complains that my project is from version 1.5 and
can't have two entry points! :-(
Eclipse settings (in properties) for GWT showed the 2.0.2 version
still, so I fixed that.

Now, with only 2.0.3 installed - back to the orginal error:

Eric Ayers

unread,
Apr 8, 2010, 6:51:38 AM4/8/10
to gwt-goo...@googlegroups.com
Arrgh! It comes through when I read my own reply in gmail, but on
google groups, it is interpreting he URL and re-writing it.

The first string had & amp ; (with no spaces) between each argument
on the query string. The second string had just the single character
& between arguments in the query string.

andrew

unread,
Apr 8, 2010, 7:48:33 PM4/8/10
to Google API Libraries for GWT
Thanks Eric. That seems to compile fine without any warnings, and
makes a lot more sense.

Should have caught that one earlier myself - so thanks for the
patience.

Now Maps API seems to work in FireFox and IE, so a significant
improvement for me!

Thanks.
Reply all
Reply to author
Forward
0 new messages