Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does it think password is a schema?
    primarykey
    data
    text
    <p>Something in my program is making it think password is a schema, and I have no idea what. I believe it is somewhere in this method:</p> <pre><code>@Resource(name="TimezoneResource") private DataSource source; public String newUser() throws SQLException { if (source == null) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(null, "No database connection");; return null; } Connection conn = source.getConnection(); try { PreparedStatement stat = conn.prepareStatement( "SELECT UserName " + "FROM Users " + "WHERE UserName=?"); stat.setString(1, userName); ResultSet result = stat.executeQuery(); if (result.next()) { errorMessage = "There is already a user with that name. Please choose another."; return "login"; } else { errorMessage = ""; stat = conn.prepareStatement( "INSERT INTO Users" + "VALUES (?, ?, ?)"); stat.setString(1, userName); stat.setString(2, password); stat.setString(3, null); stat.executeUpdate(); return "index"; } } finally { conn.close(); } } </code></pre> <p>The full error that I'm getting is as follows:</p> <blockquote> <p>type Exception report</p> <p>messageInternal Server Error</p> <p>descriptionThe server encountered an internal error that prevented it from fulfilling this request.</p> <p>exception</p> <p>javax.servlet.ServletException: java.sql.SQLSyntaxErrorException: Schema 'PASSWORD' does not exist root cause</p> <p>javax.faces.el.EvaluationException: java.sql.SQLSyntaxErrorException: Schema 'PASSWORD' does not exist root cause</p> <p>java.sql.SQLSyntaxErrorException: Schema 'PASSWORD' does not exist root cause</p> <p>org.apache.derby.client.am.SqlException: Schema 'PASSWORD' does not exist</p> </blockquote> <p>I also have no idea why it is going to the derby client. I'm using MySQL and connecting through GlassFish's JDBC resources. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload