Hi Fran, I don't think this question is related to GWT at all. Since your code is certainly executed on the server side, this has only to do with two projects: MySQL, and maybe Tomcat. While it's possible that someone here knows your answer by chance, it's so much more likely that you get lots of good answers, if you ask the question on MySQL (or maybe Tomcat) forums.
Before you ask there, the first thing you should do, is to create a new, simple test project, which doesn't use GWT or Tomcat at all, and only uses the MySQL driver. This way, you'll see, if this has anything to do with Tomcat (like e.g. driver conflicts...). HTH to find your answer Chris On Mar 8, 7:21 pm, Fran <[email protected]> wrote: > He is the GWT code: > > public abstract class DB_Conn { > > private String url; > > public DB_Conn() { > > url = "jdbc:mysql://xxxxxxxxxxxxxxx:3306/"; > } > > protected Connection getConn() { > > Connection conn = null; > > String url = getServerURL(); > > String db = "xxxxx"; > String driver = "com.mysql.jdbc.Driver"; > String user = "xxxxx"; > String pass = "xxxxx"; > > try { > > Class.forName(driver).newInstance(); > conn = DriverManager.getConnection(url+db, > user, pass); > > } catch (Exception e) { > > System.err.println("Mysql Connection Error: > "); > e.printStackTrace(); > } > > return conn; > } > > private String getServerURL() { > return url; > } > > protected static int getResultSetSize(ResultSet resultSet) { > int size = -1; > > try { > resultSet.last(); > size = resultSet.getRow(); > resultSet.beforeFirst(); > } catch(SQLException e) { > return size; > } > > return size; > } > > } > > On 8 mar, 19:13, Fran <[email protected]> wrote: > > > > > help me please! :( > > > On 8 mar, 14:40, Fran <[email protected]> wrote: > > > > I cant understand what is the problem :( > > > > is possible a problem with iptables? > > > > On 8 mar, 01:27, Fran <[email protected]> wrote: > > > > > Hi, > > > > > I have a problem with a tomcat and MySQL driver. > > > > > If I use a tomcat instalation in Windows, it works fine. > > > > If I put the aplication in a production server (Linux centoos), It > > > > dont work. > > > > This is the output of catalina.out > > > > > Mysql Connection Error: > > > > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: > > > > Communications link failure > > > > > The last packet sent successfully to the server was 0 milliseconds > > > > ago. The driver has not received any packets from the server. > > > > > Anyone know this problem? Help me please! > > > > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
