2 Replies Latest reply on Feb 15, 2002 2:28 PM by rpmorris

    ClassCastException from JassSecurityManager

    rpmorris


      I'm using JBoss-2.4.4_Jetty-3.1.3-1 with the DatabaseServerLoginModule. I'm trying to access a web page protected using Basic authentication. The JaasSecurityManager returns a ClassCastException in doesUserHaveRole. The error message follows.

      Any suggestions on the possible cause would be appreciated.

      [JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@201e8a
      [JaasSecurityManagerService] setCachePolicy, c=null
      [JaasSecurityManagerService] Added mediaShare-domain, org.jboss.security.plugins.JaasSecurityManager@201e8a to map
      [Jetty] Security- User: admin
      [Jetty] Security- created JBossUserRealm::User: admin
      [Default] User 'admin' authenticated.
      [Jetty] Security- User: admin is authenticated
      [Jetty] WARNING: GET /mediaShare/ HTTP/1.1
      java.lang.ClassCastException: java.lang.String
      at org.jboss.security.plugins.JaasSecurityManager.doesUserHaveRole(JaasSecurityManager.java:278)
      at org.jboss.jetty.JBossUserRealm$User.isUserInRole(JBossUserRealm.java:105)
      at org.mortbay.http.handler.SecurityHandler.authenticatedInRole(SecurityHandler.java:360)
      at org.mortbay.http.handler.SecurityHandler.handle(SecurityHandler.java:286)
      at org.mortbay.http.HandlerContext.handle(HandlerContext.java:1037)
      at org.mortbay.http.HandlerContext.handle(HandlerContext.java:992)
      at org.mortbay.http.HttpServer.service(HttpServer.java:699)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:148)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Thread.java:484)