[jboss-user] [Security & JAAS/JBoss] - jdbcRealm - ClassCastException when trying to log in

mendret do-not-reply at jboss.com
Wed Feb 25 09:14:24 EST 2009


hello, i'm currently migrating a webapp from tomcat 4.x to jboss 5.0.0.GA but if i try to login into the webapp i get the following error:

  | java.lang.ClassCastException: org.apache.catalina.realm.GenericPrincipal cannot be cast to org.jboss.web.tomcat.security.JBossGenericPrincipal
  | ...
  | 

i'm using jdbcRealm for the authentication and the context.xml looks like this:

  | <Context path="/myApp"
  |               debug="0"
  |               privileged="true">
  |      <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
  |                  driverName="com.mysql.jdbc.Driver"
  |                  connectionName="jdbc:mysql://localhost:3306/myapp?characterEncoding=utf-8&autoReconnect=true"
  |                  connectionName="test"
  |                  connectionPassword="***"
  |                  userTable="LOGIN" userNameCol="LOGINNAME"
  |                  userCredCol="PASSWORD"
  |                  userRoleTable="ROLES" roleNameCol="PRINCIPAL"
  |                  digest="MD5" />
  | </Context> 
  | 

when i login with a wrong name/pw i get to my errorpage so the connection seems to be alright.

has anyone a suggestion what might cause this error?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212996#4212996

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212996



More information about the jboss-user mailing list