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.

Reply via email to