The import java.sql cannot be resolved help

2,018 views
Skip to first unread message

albries

unread,
Jun 15, 2007, 9:16:36 PM6/15/07
to Google Web Toolkit
sorry for my english im speak spanish

i have a problem in netbeans whe i execute a project with gwt, this
return the error:
The import java.sql cannot be resolved

i add in the library the mysql-connector but i dont now how to make
when build the project import also the library, i read something like
to edit the gwt.xml file but i don really understand this.

someone can explain me how to do to that the project import the mysql
ibrary,

thanks

Chad Bourque

unread,
Jun 15, 2007, 9:31:18 PM6/15/07
to Google-We...@googlegroups.com
albries,
 
Any class not emulated by GWT (you can find a list of these classes in the documentation) cannot be used on the client. So, to do database interaction, you put that code on the server-side and use RPC to communicate from the client to the server. There are SEVERAL examples on this forum of database interaction. It's pretty straight forward after you understand it. Basically, you make an asyncronous call from the client to the server. Then, the server interacts with the database. Once you get your ResultSet, you copy the data into data transfer objects and return the data transfer objects back to the client. Just search the forum for more detailed explanations and examples.
 
HTH,
Chad

 

charlie...@gmail.com

unread,
Jun 16, 2007, 8:11:17 PM6/16/07
to Google Web Toolkit
As Chad noted, you will want to do sql stuff on the server side, not
in the client.

The docs for what is translatable (what you CAN use in a GWT client)
are here:
http://code.google.com/webtoolkit/documentation/jre.html

Reply all
Reply to author
Forward
0 new messages