The classcastexception does not occur in the CustomLoginModule. It occurs in a
servlet(spring controller) that has access to the httprequest object.
This means that the CustomPrincipal is located in 2 places. May be in your WEB-INF/lib or
WEB-INF/classes. Get rid of that. The jar containing your login module and CustomPrincipal
should be in the server classpath, visible to Server Classloader. This indicates your
class is being picked up by 2 classloaders
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186064#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...