5 Replies Latest reply on Nov 14, 2006 8:44 AM by r raivil

    got 403 error but module auth worked

    r raivil Newbie

      I have a custom login module (Plain JAAS), tested with tomcat/oracle/jetty.
      I configured Jboss to use it (jboss-web.xml and login-config.xml).
      The log shows the login module working. It shows me all the roles.
      but after login I get a 403 denied page.
      The login module I made is base on this: http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm
      I lost int here.
      can anyone help?

        • 1. Re: got 403 error but module auth worked
          jaikiran pai Master

          Please post the logs and the exception stacktrace that you are seeing.(Remember to use the "Code" button to wrap the contents in code block while posting the logs and stacktrace).

          • 2. Re: got 403 error but module auth worked
            r raivil Newbie

            thats the logs and configs files.

            [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200 510231054)]

            there are no erros, except the FacesServlet

            jboss-web.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <jboss-web>
            <security-domain>java:/jaas/DBTableLoginModuleTest</security-domain>
            </jboss-web>
            



            login-config.xml
             <application-policy name = "DBTableLoginModuleTest">
             <authentication>
             <login-module code = "loginmodule.DBTableLM.DBTableLoginModule" flag = "required" >
             <module-option name="debug">true</module-option>
             <module-option name="log_level">ALL</module-option>
             <module-option name="jdbcUrl">jdbc:firebirdsql:myhost/3050:/opt/firebird/data/mybase.gdb</module-option>
             <module-option name="jdbcDriver">org.firebirdsql.jdbc.FBDriver</module-option>
             <module-option name="db_schema">sysdba</module-option>
             <module-option name="db_schema_pw">masterkey</module-option>
             <module-option name="logger_class">loginmodule.util.JavaLoggerImpl</module-option>
             </login-module>
             </authentication>
             </application-policy>
            


            web.xml


            
             <security-constraint>
             <web-resource-collection>
             <web-resource-name>PROTECTED CONTENT</web-resource-name>
             <url-pattern>*.faces</url-pattern>
             </web-resource-collection>
             <auth-constraint>
             <role-name>USUARIO_AUTENTICADO</role-name>
             </auth-constraint>
             </security-constraint>
             <login-config>
             <auth-method>FORM</auth-method>
             <form-login-config>
             <form-login-page>/login.jsp</form-login-page>
             <form-error-page>/loginError.jsp</form-error-page>
             </form-login-config>
             </login-config>
             <security-role>
             <description>USUARIOS AUTENTICADOS</description>
             <role-name>USUARIO_AUTENTICADO</role-name>
             </security-role>
             <security-role>
             <description>USUARIOS AUTENTICADOS</description>
             <role-name>USUARIO_VALIDO</role-name>
             </security-role>
             <security-role>
             <description>USUARIOS AUTENTICADOS</description>
             <role-name>CLIENTE_VALIDO</role-name>
             </security-role>
            
            



            deployment log

            2006-10-26 09:08:28,390 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:28,390 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:28,390 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war -> C:\Java\jboss-403SP1\server\default\tmp\deploy\tmp16962Sisbov.war
            2006-10-26 09:08:28,656 DEBUG [org.jboss.deployment.MainDeployer] using deployer MBeanProxyExt[jboss.web:service=WebServer]
            2006-10-26 09:08:28,656 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Begin init
            2006-10-26 09:08:28,656 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Unpacking war to: C:\Java\jboss-403SP1\server\default\tmp\deploy\tmp16962Sisbov-exp.war
            2006-10-26 09:08:30,328 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Replaced war with unpacked contents
            2006-10-26 09:08:30,328 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] webContext: null
            2006-10-26 09:08:30,328 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] warURL: file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/
            2006-10-26 09:08:30,343 DEBUG [org.jboss.webservice.ServiceDeployer] handleNotification: org.jboss.deployment.SubDeployer.init,Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] End init
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
            2006-10-26 09:08:30,343 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/
            2006-10-26 09:08:30,343 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@3570b0, cl=org.jboss.mx.loading.UnifiedClassLoader3@54782a{ url=file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/ ,addedOrder=0}
            2006-10-26 09:08:30,343 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@3570b0, cl=org.jboss.mx.loading.UnifiedClassLoader3@54782a{ url=file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/ ,addedOrder=0}
            2006-10-26 09:08:30,343 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@54782a{ url=file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/ ,addedOrder=0}
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.system.ServiceController] Creating service jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:30,343 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: []
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.WebModule] Creating jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.WebModule] Created jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:30,343 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.web.deployment:war=Sisbov.war,id=391829063 dependents are: []
            2006-10-26 09:08:30,343 DEBUG [org.jboss.webservice.ServiceDeployer] handleNotification: org.jboss.deployment.SubDeployer.create,Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:30,343 DEBUG [org.jboss.system.ServiceController] starting service jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.WebModule] Starting jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] webContext: null
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] warURL: file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] webAppParser: org.jboss.web.AbstractWebDeployer$DescriptorParser@19d2f6b
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.WebPermissionMapping] Qualified url patterns: {/=PatternInfo[pattern=/,type=3,isOverriden=false,qualifiers=[PatternInfo[pattern=*.faces,type=2,isOverriden=false,qualifiers=[]]]], *.faces=PatternInfo[pattern=*.faces,type=2,isOverriden=false,qualifiers=[]]}
            2006-10-26 09:08:30,343 INFO [org.jboss.web.tomcat.tc5.TomcatDeployer] deploy, ctxPath=/Sisbov, warUrl=.../tmp/deploy/tmp16962Sisbov-exp.war/
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] AbstractWebContainer.parseWebAppDescriptors, Begin
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@943653
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] ..org.jboss.mx.loading.UnifiedClassLoader3@54782a{ url=file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/ ,addedOrder=44}
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] ..org.jboss.system.server.NoAnnotationURLClassLoader@ab95e6
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] ..sun.misc.Launcher$AppClassLoader@e39a3e
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] ..sun.misc.Launcher$ExtClassLoader@a39137
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered.
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Linked java:comp/UserTransaction to JNDI name: UserTransaction
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] addEnvEntries
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkResourceEnvRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkResourceRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkMessageDestinationRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkEjbRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkEjbLocalRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkServiceRefs
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] linkSecurityDomain
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Linking security/securityMgr to JNDI name: java:/jaas/DBTableLoginModuleTest
            2006-10-26 09:08:30,343 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] AbstractWebContainer.parseWebAppDescriptors, End
            2006-10-26 09:08:30,359 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Using session cookies default setting
            2006-10-26 09:08:30,437 DEBUG [org.jboss.web.tomcat.filters.ReplyHeaderFilter] Adding header name: X-Powered-By='Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5'
            2006-10-26 09:08:30,640 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Sisbov]] StandardWrapper.Throwable
            java.lang.NullPointerException
             at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
             at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
             at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
             at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
             at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
             at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
             at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
             at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
             at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
             at org.jboss.web.WebModule.startModule(WebModule.java:68)
             at org.jboss.web.WebModule.startService(WebModule.java:46)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy30.start(Unknown Source)
             at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy31.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy4.start(Unknown Source)
             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy5.deploy(Unknown Source)
             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
             at org.jboss.Main.boot(Main.java:187)
             at org.jboss.Main$1.run(Main.java:438)
             at java.lang.Thread.run(Thread.java:595)
            2006-10-26 09:08:30,687 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Sisbov]] Servlet /Sisbov threw load() exception
            java.lang.NullPointerException
             at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
             at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
             at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
             at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
             at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
             at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
             at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
             at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
             at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
             at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
             at org.jboss.web.WebModule.startModule(WebModule.java:68)
             at org.jboss.web.WebModule.startService(WebModule.java:46)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy30.start(Unknown Source)
             at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy31.start(Unknown Source)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy4.start(Unknown Source)
             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy5.deploy(Unknown Source)
             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
             at org.jboss.Main.boot(Main.java:187)
             at org.jboss.Main$1.run(Main.java:438)
             at java.lang.Thread.run(Thread.java:595)
            2006-10-26 09:08:31,953 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Initialized: {WebApplication: /C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/, URL: file:/C:/Java/jboss-403SP1/server/default/tmp/deploy/tmp16962Sisbov-exp.war/, classLoader: java.net.FactoryURLClassLoader@943653:9713235} jboss.web:j2eeType=WebModule,name=//localhost/Sisbov,J2EEApplication=none,J2EEServer=none
            2006-10-26 09:08:31,953 DEBUG [org.jboss.web.WebModule] Started jboss.web.deployment:war=Sisbov.war,id=391829063
            2006-10-26 09:08:31,953 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.web.deployment:war=Sisbov.war,id=391829063 dependent components: []
            2006-10-26 09:08:31,968 DEBUG [org.jboss.webservice.ServiceDeployer] handleNotification: org.jboss.deployment.SubDeployer.start,Sisbov.war
            2006-10-26 09:08:31,968 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: Sisbov.war
            2006-10-26 09:08:31,968 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            2006-10-26 09:08:31,968 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war -> file:/C:/Java/jboss-403SP1/server/default/deploy/Sisbov.war
            



            output log after login
            2006-10-26 09:08:46,218 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in 31s:343ms
            2006-10-26 09:12:40,843 DEBUG [org.jboss.security.plugins.JaasSecurityManager.DBTableLoginModuleTest] CallbackHandler: org.jboss.security.auth.callback.SecurityAssociationHandler@fa43e8
            2006-10-26 09:12:40,843 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@805298
            2006-10-26 09:12:40,843 DEBUG [org.jboss.security.plugins.JaasSecurityManager.DBTableLoginModuleTest] CachePolicy set to: org.jboss.util.TimedCachePolicy@ae7b77
            2006-10-26 09:12:40,843 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@ae7b77
            2006-10-26 09:12:40,843 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Added DBTableLoginModuleTest, org.jboss.security.plugins.SecurityDomainContext@12bc407 to map
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl initializeLogger
            INFO: Logger initialized for properties file: "null"
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option debug = true
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option jdbc Url = jdbc:firebirdsql:myhost/3050:/opt/firebird/data/mybase.gdb
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option jdbc Class = org.firebirdsql.jdbc.FBDriver
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option log level = log all
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option logger class = loginmodule.util.JavaLoggerImpl
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] option db schema = sysdba
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] login called on DBTableLoginModule
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Calling callbackhandler ...
            2006-10-26 09:12:40,859 INFO [STDOUT] 26/10/2006 09:12:40 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Username returned by callback = 1001
            2006-10-26 09:12:41,109 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Connection: jdbc:firebirdsql:myhost/3050:/opt/firebird/data/mybase.gdb username: sysdba password: **************
            2006-10-26 09:12:41,109 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] User query string: select ********
            2006-10-26 09:12:41,250 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] The resultSet is not in a row, use next
            2006-10-26 09:12:41,250 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] User query string: select ******
            2006-10-26 09:12:41,281 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] User primary key value found = 1001
            2006-10-26 09:12:41,281 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] User 1001 authenticated successfully
            2006-10-26 09:12:41,281 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] DBUser Principal Name: 1001
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Logon Successful = true
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Subject contains 0 Principals before auth
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Local LM commit succeeded
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Subject contains 3 Principals after auth
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Added Role: 1001
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Added Role: USUARIO_AUTENTICADO
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Added Role: CLIENTE_VALIDO
            2006-10-26 09:12:41,296 INFO [STDOUT] 26/10/2006 09:12:41 loginmodule.util.JavaLoggerImpl print
            INFO: [DBTableLoginModule] Cleaning internal state!
            


            result:


            HTTP Status 403 - Access to the requested resource has been denied

            type Status report

            message Access to the requested resource has been denied

            description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
            Apache Tomcat/5.5


            • 3. Re: got 403 error but module auth worked
              jaikiran pai Master

              The logs show that the user is authenticated successfully. However what are the required roles to access that page/resource? Is the user (1001) in that role?

              • 4. Re: got 403 error but module auth worked
                r raivil Newbie

                Yes it is!

                I tested this module with oc4j and tomcat5.5 and it works fine!

                • 5. Re: got 403 error but module auth worked
                  r raivil Newbie

                  JBoss expects to find the user's roles in a group called "Roles"

                  instead of just adding roles to the Subject, add a Group o roles caales "Roles"

                  java.security.acl.GrouprolesGroup = new SimpleGroup( "Roles" );
                   rolesGroup.addMember(
                   new SimplePrincipal( "ExampleRole" ) );
                  subject.getPrincipals().add(group);