I have exactly the same issue with JBoss 7.1.1. For the ClassCastException itself, I do not have a solution, but I have a workaround which works until I have a clean and staight solution.
When retrieving the principal via
public SessionContext sessionContext;
Principal principal = sessionContext.getCallerPrincipal();
I check the name of the instantiated class via
to assure the correct implementation and to avoid later exceptions. Then I work with reflection to access fields and method via getMethod() and getField(). It works fine, but it is quite ugly. Does anyone have a better idea?