2 Replies Latest reply on May 6, 2008 3:16 AM by Anand shekhar

    Obtaining SecurityManagerService failed

    awanis zaini Newbie

      My collegue developed a programme for security during login..but upon login i get this error...how do i fix it??could u guys help me out...i really am a beginner...
      2006-12-26 15:51:36,453 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Obtaining SecurityManagerService failed::
      java.lang.ClassCastException: org.jnp.interfaces.NamingContext
      at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSecurityManagerService(SecurityFlushSessionListener.java:193)
      at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSubjectAndSecurityDomain(SecurityFlushSessionListener.java:160)
      at org.jboss.web.tomcat.security.SecurityFlushSessionListener.sessionDestroyed(SecurityFlushSessionListener.java:79)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:645)
      at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1090)
      at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:149)
      at com.utm.iumis.sadm.struts.action.penyelenggaraansistem.AuthenticationAction.execute(AuthenticationAction.java:106)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      2006-12-26 15:51:36,453 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Unable to obtain SecurityDomain

        • 1. Re: Obtaining SecurityManagerService failed
          Anil Saldanha Master

          JNDI look up of the security manager seems to be failing. This may be due to muddled up classpath. Can you try with a fresh instance of JBoss?

          Also do you have uncommented out security constraints in your web.xml? without which, there may not be any security manager bound.

          • 2. Re: Obtaining SecurityManagerService failed
            Anand shekhar Newbie

            Hello

            When i log out from the application it will give me Error as follows otherwise all running fine.My app is deployed on jbsss verson jboss-4.2.1 and i am using JNDI for Connection pooling.

            i came to know that i have write to few codes in Web.xml to avoid this exception

            <?xml version="1.0" encoding="UTF-8"?>
            
            <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
             version="2.4">
             <session-config>
             <session-timeout>
             180
             </session-timeout>
             </session-config>
            
            
             <servlet>
             <servlet-name>MyThreadSMB</servlet-name>
             <servlet-class>com.np.XX.sftp.ServletForMyThread</servlet-class>
             <load-on-startup>5</load-on-startup>
             </servlet>
             <welcome-file-list>
             <welcome-file>
             index.jsp
             </welcome-file>
             </welcome-file-list>
            </web-app>


            Igot Exception

            [com.np.XX.admin.number_of_subscrip] Logged Out User: admin
            2008-05-06 11:55:17,780 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Obtaining SecurityManagerService failed::
            java.lang.ClassCastException: org.jnp.interfaces.NamingContext
            at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSecurityManagerService(SecurityFlushSessionListener.java:193)
            at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSubjectAndSecurityDomain(SecurityFlushSessionListener.java:160)
            at org.jboss.web.tomcat.security.SecurityFlushSessionListener.sessionDestroyed(SecurityFlushSessionListener.java:79)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
            at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1111)
            at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
            at org.apache.jsp.admin.logout_jsp._jspService(logout_jsp.java:81)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:595)
            2008-05-06 11:55:17,780 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Unable to obtain SecurityDomain