My installation is Cofax 2.0 RC3. I am using Tomcat
4.1.30 on Linux... when editing an article, adding a
publication, etc i get the following error:
CofaxToolsServlet doGet ERROR: occurred during a
database transaction: MySqlDataStore getPackageData
ERROR: java.sql.SQLException: Can not issue data
manipulation statements with executeQuery()
Logged In: YES
user_id=1222831
Error is due to more recent jdbc compliant driver which is
enforcing a restriction that any database transaction that
is manipulating data must use either the Statement.execute()
or Statement.executeUpdate() instead of the
Statement.executeQuery used in the smile section of the
library code. I found a similar error reported on the mysql
web site:
How to repeat:
sqlQuery = "UPDATE documents SET web_exp = NOW() WHERE
fund_id='" + fund_id + "'
AND doctype='" + doctype + "' AND web_ver ='" + web_ver + "'
AND (web_exp IS
NULL OR TO_DAYS(web_exp) > TO_DAYS(NOW()))";
rs = stmt.executeQuery(sqlQuery);
[20 Jun 2003 9:03am] Mark Matthews
The JDBC spec states that you must either use
Statement.executeUpdate() or
Statement.execute() for queries that manipulate data (such
as your 'UPDATE
documents SET web_exp....' query).
Older versions of the JDBC driver were more lax on this.
However, it is
important to be JDBC-compliant, so the later versions of the
driver enforce this
requirement.
Logged In: YES
user_id=1283696
Originator: NO
refactoring executeQuery() into execute()