jQuery in Action, 2nd edition*
The moose likes Tomcat and the fly likes JDBCRealm - invalid column name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JDBCRealm - invalid column name" Watch "JDBCRealm - invalid column name" New topic
Author

JDBCRealm - invalid column name

deb platt
Ranch Hand

Joined: Jan 23, 2008
Posts: 44
I am trying to configure my web site to use form authentication, with the passwords and login ids being stored in an Oracle database. When I try to authenticate, however, org.apache.cataline.realm.JDBCRealm getPassword is throwing a java.sql.SQLExcpetion, saying invalid column name.

I am assuming that the string I've entered for userCredCol is not mapping to a column in the table I've entered as userTable. However, I've copied and pasted the name of the password column into the <Realm ...> element field, userCredCol.

Any thoughts on how I continue to troubleshoot this? Can I assume that JDBCRealm did find the column associated with userNameCol?

Deb
deb platt
Ranch Hand

Joined: Jan 23, 2008
Posts: 44
It turns out the the userNameCol in my server.xml did not match the name of the column in the database, so that's why I was getting the "Invalid Column" error.

I had also misunderstood the error message that I was getting. Because it first said, "org.apache.catalina.realm.JDBCRealm getPassword, then threw an invalid column name exception, I thought that this meant that the password column in my database did not match the name I had entered as userCredCol in my Realm element, so I was overly focused on this. However "JDBCRealm getPassword" must refer to the entire authentication process, not just the attempt to get the database's password.

Deb
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBCRealm - invalid column name
 
Similar Threads
Custom digest algorithm possible with extended JDBCRealm?
No Realm has been configured to authenticate against
Composite PK - encountered invalid index column error
Problem with JDBCRealm configuration
How to use Bind Variable with FROM and UPDATE clauses in PreparedStatement???