First of all you shouldn't rethrow the exception.
That hides the true nature of the problem.
-Original Message-
From: jsp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 4:17 AM
To: 'Tomcat Users List'
Subject: MYSQL and TOMCAT
PreparedStatement updateInfo;
What I see
your are losing the real message of the error:
catch (SQLException sqle) {
error = Update failed, possible duplicate entry;
throw new SQLException( error );
}
Better you should do:
catch (SQLException
java.sql.SQLException: Update failed, possible duplicate entry
Let's see you have a table info with one field and that field is a primary key right?
If I remember correctly, primary keys in a table have to be unique, so maybe you are calling
your method with the same data again and again ?
Gareth,
What are the errors?
We're running mysql under Tomcat and our corresponding code is:
Class.forName(org.gjt.mm.mysql.Driver).newInstance();
this.connection = DriverManager.getConnection(jdbc:mysql:// +
this.databaseHost +: + this.databasePort + / +