Download mysql-connector-java-5.1.5-bin.jar and put into the lib
folder

On Jan 1, 4:14 am, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:
> You have probably enabled Google App Engine for your project. Disable it
> (its a setting in eclipse), and things should run fine.
>
> You could also be missing the mysql driver jar files in your classpath, but
> I assume you have taken care of that.
>
> --Sri
>
> 2009/12/31 Abhay Singh <abhay.asi...@gmail.com>
>
>
>
> > Hi
>
> > I am trying to connect Mysql database but getting this error(DB part
> > is in server side code, which get invoked through RPC)
>
> > The server is running athttp://localhost:8080/
> > Call Failed
> > Dec 31, 2009 7:07:16 AM com.google.apphosting.utils.jetty.JettyLogger
> > warn
> > WARNING: Nested in javax.servlet.ServletException: init:
> > java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection
> >        at java.lang.Class.getDeclaredConstructors0(Native Method)
> >        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
> >        at java.lang.Class.getConstructor0(Class.java:2671)
> >        at java.lang.Class.newInstance0(Class.java:321)
> >        at java.lang.Class.newInstance(Class.java:303)
> >        at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
> >        at org.mortbay.jetty.servlet.ServletHolder.getServlet
> > (ServletHolder.java:339)
> >        at
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 463)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1093)
> >        at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at com.google.appengine.tools.development.StaticFileFilter.doFilter
> > (StaticFileFilter.java:121)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >        at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >        at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >        at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >        at
> > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> > (DevAppEngineWebAppContext.java:54)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at com.google.appengine.tools.development.JettyContainerService
> > $ApiProxyHandler.handle(JettyContainerService.java:313)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at org.mortbay.jetty.Server.handle(Server.java:313)
> >        at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 506)
> >        at org.mortbay.jetty.HttpConnection$RequestHandler.content
> > (HttpConnection.java:844)
> >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> >        at org.mortbay.io.nio.SelectChannelEndPoint.run
> > (SelectChannelEndPoint.java:396)
> >        at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> > (BoundedThreadPool.java:442)
> > Dec 31, 2009 7:07:16 AM com.google.apphosting.utils.jetty.JettyLogger
> > warn
> > WARNING: /sample/greet
> > java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection
> >        at java.lang.Class.getDeclaredConstructors0(Native Method)
> >        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
> >        at java.lang.Class.getConstructor0(Class.java:2671)
> >        at java.lang.Class.newInstance0(Class.java:321)
> >        at java.lang.Class.newInstance(Class.java:303)
> >        at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
> >        at org.mortbay.jetty.servlet.ServletHolder.getServlet
> > (ServletHolder.java:339)
> >        at
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 463)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1093)
> >        at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at com.google.appengine.tools.development.StaticFileFilter.doFilter
> > (StaticFileFilter.java:121)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >        at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >        at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >        at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >        at
> > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> > (DevAppEngineWebAppContext.java:54)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at com.google.appengine.tools.development.JettyContainerService
> > $ApiProxyHandler.handle(JettyContainerService.java:313)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at org.mortbay.jetty.Server.handle(Server.java:313)
> >        at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 506)
> >        at org.mortbay.jetty.HttpConnection$RequestHandler.content
> > (HttpConnection.java:844)
> >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> >        at org.mortbay.io.nio.SelectChannelEndPoint.run
> > (SelectChannelEndPoint.java:396)
> >        at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> > (BoundedThreadPool.java:442)
>
> > here is my function to connect db...
> > import java.sql.SQLException;
> > import sample.client.GreetingService;
> > import com.google.gwt.user.server.rpc.RemoteServiceServlet;
> > import com.mysql.jdbc.Connection;
> > import com.mysql.jdbc.ResultSet;
> > import com.mysql.jdbc.Statement;
>
> > @SuppressWarnings("serial")
> > public class GreetingServiceImpl extends RemoteServiceServlet
> > implements GreetingService {
> > public String[] Getdata(){
> >                String[] location = null;
> >                String query = "Select ge_cntry from mst_geo where
> > ge_zone='AFRICA'";
> >                int ix=0;
>
> >                System.out.println("In Getdata Funtion");
> >                try{
> >                        Connection conn = DBUtils.getConn();
> >                        Statement select = (Statement)
> > conn.createStatement();
> >                    ResultSet result = (ResultSet)
> > select.executeQuery(query);
> >                    while (result.next()) {
> >                        location[ix++] = result.getString(1);
> >                    }
> >                    select.close();
> >                    result.close();
> >                    conn.close();
> >                }catch(SQLException e){
> >                        System.err.println("Mysql Statement Error: " +
> > query);
> >                        e.printStackTrace();
> >                }
> >                return location;
> >        }
> > }
>
> > what is wrong here?
>
> > --
>
> > 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-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsubs 
> > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

--

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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to