0 Replies Latest reply on Jan 18, 2004 2:40 PM by eafigbo

    Erratic behavior, Principal Roles=null

    eafigbo Newbie

       

      "eafigbo" wrote:
      Hello,
      i am trying to access a JAAS protected Session Bean indirectly from a JSP.
      The JSP Calls on a java class which in turn calls on the session bean.

      Some times everything works just fine, but at random intervals, it fails with the Exception as shown in the stack trace below.

      i have included the stack trace, the Login Module code and excerpts from the Login Config File below.
      Any input at all will be appreciated as i am at my wits end.
      Thank you in advance.
      cheers


      ***STACK TRACE*****

      004-01-18 21:15:20,604 ERROR [STDERR] de.danet.an.workflow.api.FactoryConfigurationError: Cannot create WorkflowEngineEJB: EJBException:; nested exception is:
      javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      Insufficient method permissions, principal=null, method=create, interface=HOME, requiredRoles=[User], principalRoles=null
      2004-01-18 21:15:20,604 ERROR [STDERR] at de.danet.an.workflow.ejbs.util.StandardWorkflowServiceFactory.<init>(StandardWorkflowServiceFactory.java:132)
      2004-01-18 21:15:20,604 ERROR [STDERR] at sun.reflect.GeneratedConstructorAccessor134.newInstance(Unknown Source)
      2004-01-18 21:15:20,620 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      2004-01-18 21:15:20,620 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      2004-01-18 21:15:20,620 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:306)
      2004-01-18 21:15:20,620 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:259)
      2004-01-18 21:15:20,620 ERROR [STDERR] at de.danet.an.workflow.api.WorkflowServiceFactory.newInstance(WorkflowServiceFactory.java:118)
      2004-01-18 21:15:20,620 ERROR [STDERR] at com.sw.workflow.module.WorkflowAdminModuleBean.getWorkflowService(WorkflowAdminModuleBean.java:232)
      2004-01-18 21:15:20,620 ERROR [STDERR] at com.sw.workflow.module.WorkflowAdminModuleBean.getProcessList(WorkflowAdminModuleBean.java:213)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jsp.ProcessList_jsp._jspService(ProcessList_jsp.java:74)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,620 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,620 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jsp.WorkflowAdmin_jsp._jspService(WorkflowAdmin_jsp.java:84)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,620 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,620 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
      2004-01-18 21:15:20,620 ERROR [STDERR] at org.apache.jsp.Default_jsp._jspService(Default_jsp.java:353)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,636 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,636 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
      2004-01-18 21:15:20,636 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.forwardRequest(PortalManagerServlet.java:292)
      2004-01-18 21:15:20,636 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.processRequest(PortalManagerServlet.java:108)
      2004-01-18 21:15:20,636 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.doPost(PortalManagerServlet.java:209)
      2004-01-18 21:15:20,636 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2004-01-18 21:15:20,636 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      2004-01-18 21:15:20,636 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      2004-01-18 21:15:20,636 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
      2004-01-18 21:15:20,636 ERROR [STDERR] de.danet.an.util.ResourceNotAvailableException: Cannot create WorkflowEngineEJB: EJBException:; nested exception is:
      javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      Insufficient method permissions, principal=null, method=create, interface=HOME, requiredRoles=[User], principalRoles=null
      2004-01-18 21:15:20,651 ERROR [STDERR] at com.sw.workflow.module.WorkflowAdminModuleBean.getWorkflowService(WorkflowAdminModuleBean.java:237)
      2004-01-18 21:15:20,651 ERROR [STDERR] at com.sw.workflow.module.WorkflowAdminModuleBean.getProcessList(WorkflowAdminModuleBean.java:213)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jsp.ProcessList_jsp._jspService(ProcessList_jsp.java:74)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jsp.WorkflowAdmin_jsp._jspService(WorkflowAdmin_jsp.java:84)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jsp.Default_jsp._jspService(Default_jsp.java:353)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
      2004-01-18 21:15:20,651 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.forwardRequest(PortalManagerServlet.java:292)
      2004-01-18 21:15:20,651 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.processRequest(PortalManagerServlet.java:108)
      2004-01-18 21:15:20,651 ERROR [STDERR] at com.sw.portal.servlet.PortalManagerServlet.doPost(PortalManagerServlet.java:209)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2004-01-18 21:15:20,651 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      2004-01-18 21:15:20,651 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      2004-01-18 21:15:20,667 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      2004-01-18 21:15:20,667 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)


      ***** Login Config Exceprt*****

      <application-policy name = "PortalDefault">
      <authentication>



      <login-module code = "org.jboss.security.auth.spi.ProxyLoginModule"
      flag = "required">
      <module-option name = "moduleName">com.sw.workflow.jbossx.JbossDBLoginModule</module-option>
      <module-option name = "dsJndiName">java:/DefaultDS</module-option>
      <module-option name = "password-stacking">useFirstPass</module-option>
      </login-module>

      <login-module code = "org.jboss.security.ClientLoginModule"
      flag = "required">
      <module-option name = "password-stacking">useFirstPass</module-option>

      </login-module>

      </authentication>
      </application-policy>



      *****Login Module Code*****

      /*
      * JbossDBLoginModule.java
      *
      * Created on November 29, 2003, 3:59 PM
      */

      package com.sw.workflow.jbossx;

      /**
      *
      * @author Administrator
      */

      import java.security.Principal;
      import java.security.acl.Group;
      import java.util.Map;
      import java.util.Iterator;
      import java.util.List;
      import java.util.ArrayList;
      import java.sql.Connection;
      import java.sql.Statement;
      import java.sql.PreparedStatement;
      import java.sql.ResultSet;
      import java.sql.SQLException;
      import javax.sql.DataSource;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.security.auth.Subject;
      import javax.security.auth.callback.CallbackHandler;
      import javax.security.auth.login.LoginException;
      import org.jboss.security.SimpleGroup;
      import org.jboss.security.SimplePrincipal;
      import org.jboss.security.auth.spi.UsernamePasswordLoginModule;

      import com.sw.util.ejb.*;
      import com.sw.util.log.*;
      import com.sw.security.*;
      import com.sw.user.info.*;
      import com.sw.user.session.*;
      import com.sw.security.auth.util.*;



      public class JbossDBLoginModule extends org.jboss.security.auth.spi.UsernamePasswordLoginModule {

      private Principal newIdentity = null;



      /**
      * Initialize this LoginModule.
      */
      public void initialize(Subject subject, CallbackHandler callbackHandler,
      Map sharedState, Map options) {
      super.initialize(subject, callbackHandler, sharedState, options);
      newIdentity = null;

      }

      /**
      * Return <code>null</code> as the cleartext password is not available.
      * This is not a problem as we override <code>validatePassword</code>
      * as well.
      * @return null
      * @throws LoginException as defined by the interface, not really thrown.
      */
      protected String getUsersPassword() throws LoginException {
      return null;
      }

      /**
      * The validation of the input password against the expected password.
      * This version ignores the value of the expected password and uses
      * methods from staff management to verify the password.
      * @param inputPassword the password as given by the user.
      * @param expectedPassword the expected password, ignored.
      * @return true if the inputPassword is valid, false otherwise.
      */
      protected boolean validatePassword
      (String inputPassword, String expectedPassword) {
      if(getUsername() == null || inputPassword == null) {
      return false;
      }
      try{
      System.out.println("validating password");
      UserManager um = ((UserManagerHome) EjbUtilities.getHome("portal/UserManager", UserManagerHome.class)).create();
      return um.validateUser(this.getUsername(),inputPassword);
      }catch(Exception e){
      e.printStackTrace();
      return false; }
      }

      /**
      * Overriden to return the Groups that correspond to the role sets
      * assigned to the user. Creates a Group named "Roles" that
      * contains the Role "Danet StaffMgmt Member". A second group is
      * "CallerPrincipal" that provides the
      * {@link de.danet.an.staffmgmt.domain.StaffMember#key
      * application identity} rather than the security domain identity.
      * @return Group[] containing the sets of roles
      * @throws LoginException as defined by the interface, not really thrown.
      */
      protected Group[] getRoleSets() throws LoginException {
      if (getUnauthenticatedIdentity() != null
      && getIdentity().equals(getUnauthenticatedIdentity())) {
      Group[] grps = new Group[0];
      System.out.println("Returning zero Groups");
      return grps;
      }
      try {
      /** add roles as a group **/
      System.out.println("Initializing Roles");
      System.out.println("UserName is..."+this.getUsername());
      UserManager um = ((UserManagerHome) EjbUtilities.getHome("portal/UserManager", UserManagerHome.class)).create();
      Iterator rolesIterator = um.getRolesForUser(um.getUserInfo(this.getUsername()).getUserID()).iterator();
      System.out.println("Gotten UserRoles");
      ArrayList groups=new ArrayList();
      String roleName;
      SimpleGroup userRoles = new SimpleGroup("Roles");
      //groups.add(userRoles);
      System.out.println("User Roles initialized...");

      if (rolesIterator.hasNext()) {
      while (rolesIterator.hasNext()) {
      System.out.println("Adding UserRoles");
      roleName = ((RoleInfo)rolesIterator.next()).getRoleName();
      System.out.println("Role: " + roleName);
      userRoles.addMember(new SimplePrincipal(roleName));
      }
      System.out.println("User roles added");

      }
      //add caller principal
      SimpleGroup sGroup = new SimpleGroup("CallerPrincipal");

      sGroup.addMember(new SimplePrincipal(this.getUsername()));


      groups.add(userRoles);
      groups.add(sGroup);
      Group[] roleSets = new Group[groups.size()];
      groups.toArray(roleSets);
      System.out.println("number of Groups is: "+roleSets.length);

      return roleSets;

      } catch (Exception e) {
      e.printStackTrace();
      throw new LoginException(e.getMessage());
      }

      }





      }