I wrote the getProduct() method that looks like getUsername().

protected String getProduct() {
  String prodotto = null;
  Principal p = getIdentity();

  if( p != null ) {
   prodotto = ((XMalfSimplePrincipal) p).getProduct(); 
   /* Here I receive a ClassCastException */
  }
      
  return prodotto;
}

During login phase I see in server.log file a 
ClassCastException when I try to cast the Principal returned by
getIdentity() to XMalfSimplePrincipal.

(XMalfSimplePrincipal is  the Principal that I used in 
SecurityAssociation.setPrincipal() in MyClientLoginModule).



[org.jboss.security.plugins.JaasSecurityManager.XMALF-policy] Login failure
javax.security.auth.login.LoginException: java.lang.ClassCastException
        at server.security.XMalfDatabaseServerLoginModule.getProduct
(XMalfDatabaseServerLoginModule.java:339)
        at 
server.security.XMalfDatabaseServerLoginModule.getRoleSets(XMalfDatabaseServerLoginModule.java:176)

Does anybody have any idea ?

Many thanks
Moreno

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

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


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to