Can't inherit com.google.gwt.dev.util.collect

1,470 views
Skip to first unread message

Jim

unread,
Dec 17, 2009, 1:10:56 AM12/17/09
to Google Web Toolkit
I'm trying to use the om.google.gwt.dev.util.collect.HashMap class in
my source code, but Eclipse (Galileo 3.5) fails with the following
error:

Loading inherited module 'com.google.gwt.dev.util.collect'
[ERROR] Unable to find 'com/google/gwt/dev/util/collect.gwt.xml' on
your classpath; could be a typo, or maybe you forgot to include a
classpath entry for source?
[ERROR] Line 10: Unexpected exception while processing element
'inherits'

Here is my config file:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='website'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.google.gwt.dev.util.collect'/>
<inherits name='com.google.gwt.json.JSON' />
<inherits name='com.smartgwt.SmartGwt'/>
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.dc4x.website.client.Website'/>

<!-- Specify the paths for translatable code -->
<source path='client'/>

</module>


and in my code, I've got :

import com.google.gwt.dev.util.collect.HashMap;

HashMap<String, String> defaultParams = new HashMap<String,String>();
defaultParams.put("session_id", Website.sessionID);

I've looked at the Build Path and it includes the GWT 2.0.0 library
with both the gwt-user.jar and gwt-dev.jar files listed.

Anybody have any ideas or know what is wrong?

Thanks!

Jim


emeded

unread,
Dec 24, 2009, 1:40:20 PM12/24/09
to Google Web Toolkit
Hi Jim,
I am encountering a same problem. Did you fix it? Could you share
please?

Thanks

forewar

unread,
Dec 28, 2009, 1:26:31 PM12/28/09
to Google Web Toolkit
Hi all!
I also have the same problem and cant find a solution.
As far as I know, there is no such module like HashTable, so it cant
be inherited.
I suppose, the problem is deeper.
Maybe somebody will help us...

forewar

unread,
Dec 28, 2009, 2:07:54 PM12/28/09
to Google Web Toolkit
Oh, I`ve just changed my library import. Imported java.util.HashMap
instead of com.google.gwt.dev.util.collect.HashMap and I works now.
But I still dont understand what`s wrong with gwt`s HashMap.

Chris Ramsdale

unread,
Dec 30, 2009, 11:39:39 AM12/30/09
to google-we...@googlegroups.com
com.google.gwt.dev.util.collect is not meant to be used on the client side (hence the lack of a <module>.gwt.xml file). As you discovered, you should use the standard JRE HashMap, and let GWT provide the associated JS implementation at compile time.

- Chris


--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Gazer

unread,
Feb 19, 2010, 7:27:17 PM2/19/10
to Google Web Toolkit
Thanks for sharing. After modify the library to be imported, it
works.

However, it really takes some time for me on this issue. Might there
be any way to remove gwt.dev.util.collect in the importing suggestion?

On Dec 30 2009, 10:39 am, Chris Ramsdale <cramsd...@google.com> wrote:
> com.google.gwt.dev.util.collect is not meant to be used on the client side
> (hence the lack of a <module>.gwt.xml file). As you discovered, you should
> use the standard JRE HashMap, and let GWT provide the associated JS
> implementation at compile time.
>
> - Chris
>

> On Mon, Dec 28, 2009 at 2:07 PM, forewar <fore...@gmail.com> wrote:
> > Oh, I`ve just changed my library import. Imported java.util.HashMap
> > instead of com.google.gwt.dev.util.collect.HashMap and I works now.
> > But I still dont understand what`s wrong with gwt`s HashMap.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages