db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryce Nesbitt <bry...@obviously.com>
Subject Re: What are possible causes of: IDBroker ... does not support transactions.
Date Sat, 18 Feb 2006 04:27:31 GMT
Greg Monroe wrote:
> Hmm, at this point, I'd try doing a simple jsp page
> to manually open the DB and do a simple query with 
> straight JDBC calls using the DB URL and other info 
> in the Torque properties.

Thank you!  The more direct call, gave the more useful error message:
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'xxx@localhost.localdomain' (Using password: YES)

Which led to the solution (a spurious MySQL SQL GRANT).  The jsp used was:

<%@ page import="java.util.Properties" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.Driver" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.PreparedStatement" %>
    Driver driver = (Driver)
    Properties props = new Properties();
    props.setProperty("user", "xxx");
    props.setProperty("password", "xxxxxxxx");
    Connection conn = driver.connect("jdbc:mysql://localhost:3306/xxx",
    PreparedStatement stmt =
    conn.prepareStatement("SELECT THING_ID, THING_NAME FROM XXX_THING");
    ResultSet rs = stmt.executeQuery();
    if( rs != null ) {
        <th>THING ID</th>
        <th>THING Name</th>
    while( rs.next() ) {
    <tr><td><%= rs.getLong("THING_ID") %></td>
    <td><%= rs.getString("THING_NAME") %></td></tr>
} else {
ResultSet was null!

And this resolved the more cryptic error message:

9839 [tcpConnection-6809-0] WARN oid.IDBroker  - IDBroker is being used
with db 'default', which does not support transactions.  IDBroker
attempts to use transactions to limit the possibility of duplicate key
generation.  Without transactions, duplicate key generation is possible
if multiple JVMs are used or other means are used to write to the database.

Which had previously torqued us all off...
...and let us down the wrong paths.
...since the db is not named 'default',
....and since transactions were never the issue.
Thanks for the hints!

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message