• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBCRealm - invalid column name

 
deb platt
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic