java - mysql error with GWT -


i trying create sample apps using gwt , code below

public void onmoduleload() {   verticalpanel panel = new verticalpanel();   multiwordsuggestoracle oracle = new multiwordsuggestoracle();   database data=new database();      statement s1;     try {         s1 = data.conn.createstatement();          s1.executequery ("select * details limit 10");            resultset rs = s1.getresultset ();            while (rs.next ())            {                  string name = rs.getstring ("name");                oracle.add(name);            }     } catch (sqlexception e) {         // todo auto-generated catch block         e.printstacktrace();     }       suggestbox suggestbox = new suggestbox(oracle);     panel.add(new label("enter country"));     panel.add(suggestbox);     panel.addstylename("demo-panel-padded");     rootpanel.get("demo").add(panel); 

} , have added mysql-bin.jar connector in war/web_inf/lib/ , getting compilation error

17:39:52.353 [error] [a] line 28: no source code available type java.sql.statement; did forget inherit required module? 

i need know why getting error , how can rectify it

you cannot use server-side code (java.sql.* in case) in gwt client side modules.

you should make rpc call server. server callback should fetch data database, , send gwt client.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -