File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JDBCRealm - invalid column name