3 Replies Latest reply on Dec 17, 2015 4:44 PM by Brian Thomas

    Jaas problem with a webapp on JBoss 7

    Adam Lucarz Newbie

      Hi,

       

      I've got a 3rd party web application which does not work properly on JBoss 7 because it interacts with javax.security.auth.login.Configuration.set/getConfiguration() and set an own javax.security.auth.login.Configuration implementation. But JBoss 7 makes a check if Configuration.getConfiguration() returns an implementation of ApplicationPolicyRegistration. What does not happens because of the 3rd party webapp. So an java.lang.IllegalStateException (JAAS Configuration does not support application policy registration) is thrown and the login mechanism is broken.

       

      Has someone a hint, if I could do something to avoid this situation? I need this webapp and I cannot influence the webapps way to interact with javax.security.auth.login.Configuration.

       

      Best Regards

      Adam

        • 1. Re: Jaas problem with a webapp on JBoss 7
          jaikiran pai Master

          Please post the entire exception stacktrace.

          • 2. Re: Jaas problem with a webapp on JBoss 7
            Adam Lucarz Newbie

            15:26:26,344 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Begin getAppConfigurationEntry(FileNetP8WSI), size=3

            15:26:26,345 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) End getAppConfigurationEntry(FileNetP8WSI), authInfo=AppConfigurationEntry[]:

            [0]

            LoginModule Class: com.filenet.api.util.WSILoginModule

            ControlFlag: Anmeldemodul-Steuerflag: required

            Options:

             

            15:26:39,253 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Begin refresh

            15:26:39,259 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Begin loadConfig, loginConfigURL=file:/c:/login-config.xml

            15:26:39,260 DEBUG [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Try loading config as XML, url=file:/c:/login-config.xml

            15:26:39,262 DEBUG [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Failed to load config as XML: java.lang.IllegalStateException: JAAS Configuration does not support application policy registration

                at org.jboss.security.config.parser.StaxBasedConfigParser.parse(StaxBasedConfigParser.java:90) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadXMLConfig(XMLLoginConfigImpl.java:449) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:398) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:377) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.refresh(XMLLoginConfigImpl.java:116) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at com.filenet.apiimpl.util.JaasConfiguration.refresh(JaasConfiguration.java:182) [jace-4.5.1.jar:]

                at org.springframework.security.providers.jaas.JaasAuthenticationProvider.configureJaas(JaasAuthenticationProvider.java:251) [spring-security-core-2.0.4.jar:]

                at org.springframework.security.providers.jaas.JaasAuthenticationProvider.afterPropertiesSet(JaasAuthenticationProvider.java:160) [spring-security-core-2.0.4.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168) [spring-beans-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884) [spring-context-2.5.6.jar:]

                at org.springframework.security.intercept.web.FIDSToFilterChainMapConverter.<init>(FIDSToFilterChainMapConverter.java:54) [spring-security-core-2.0.4.jar:]

                at org.springframework.security.util.FilterChainProxy.afterPropertiesSet(FilterChainProxy.java:119) [spring-security-core-2.0.4.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-beans-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [spring-context-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [spring-context-2.5.6.jar:]

                at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-web-2.5.6.jar:]

                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-web-2.5.6.jar:]

                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web-2.5.6.jar:]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Final.jar:7.0.0.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]

             

            15:26:39,511 DEBUG [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) Try loading config as Sun format, url=file:/c:/login-config.xml

            15:26:39,519 INFO  [stdout] (MSC service thread 1-3) Call:   config

             

            15:26:39,520 INFO  [stdout] (MSC service thread 1-3) Return: config

             

            15:26:39,520 WARN  [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) End loadConfig, failed to load config: file:/c:/login-config.xml: org.jboss.security.auth.login.ParseException: Encountered " <ANY> "<?xml "" at line 1, column 1.

            Was expecting one of:

                <EOF>

                <IDENTIFIER> ...

               

                at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.java:415) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:352) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.java:99) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.java:58) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser.java:80) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLoginConfigImpl.java:442) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:407) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:377) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at org.jboss.security.auth.login.XMLLoginConfigImpl.refresh(XMLLoginConfigImpl.java:116) [picketbox-4.0.0.CR1.jar:4.0.0.CR1]

                at com.filenet.apiimpl.util.JaasConfiguration.refresh(JaasConfiguration.java:182) [jace-4.5.1.jar:]

                at org.springframework.security.providers.jaas.JaasAuthenticationProvider.configureJaas(JaasAuthenticationProvider.java:251) [spring-security-core-2.0.4.jar:]

                at org.springframework.security.providers.jaas.JaasAuthenticationProvider.afterPropertiesSet(JaasAuthenticationProvider.java:160) [spring-security-core-2.0.4.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168) [spring-beans-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884) [spring-context-2.5.6.jar:]

                at org.springframework.security.intercept.web.FIDSToFilterChainMapConverter.<init>(FIDSToFilterChainMapConverter.java:54) [spring-security-core-2.0.4.jar:]

                at org.springframework.security.util.FilterChainProxy.afterPropertiesSet(FilterChainProxy.java:119) [spring-security-core-2.0.4.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.jar:]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.6.jar:]

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-beans-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [spring-context-2.5.6.jar:]

                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [spring-context-2.5.6.jar:]

                at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-web-2.5.6.jar:]

                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-web-2.5.6.jar:]

                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web-2.5.6.jar:]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Final.jar:7.0.0.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]

                at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]

             

            15:26:39,759 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (MSC service thread 1-3) End refresh

            • 3. Re: Jaas problem with a webapp on JBoss 7
              Brian Thomas Newbie

              You should convert your application policy to a security policy. I am not sure if you are using a Windows OS, but here is my solution for the FileNet module on RHEL7 in a EAP6.4 Managed Domain. It includes the application policy to security policy conversion.

               

              Converting FileNet P8 WSILoginModule from EAP 5 to a global module in an EAP 6.4 Managed Domain on RHEL7

               

               

              WSILoginModule Dependencies:

               

               

              users.properties

              roles.properties

              WcmApiConfig.properties

              Application Policy for FileNetP8WSI in login-config.xml

              Jace.jar

              javaapi.jar

              p8cjares.jar

              stax-api.jar

              xlxpScanner.jar

              xlxpScannerUtils.jar

               

               

              1. In the EAP 6.4 Managed Domain, create an global environment variable in .bashrc for $JBOSS_HOME on every server. In this case, $JBOSS_HOME is /usr/share/jbossas. The FileNet module looks in $JBOSS_HOME for WcmApiConfig.properties.

               

               

              2. Then copy the WcmApiConfig.properties file to /usr/share/jbossas. Ensure that it looks as follows:

               

               

              ### WcmApiConfig.properties for FileNet WSILoginModule

              RemoteServerUrl = https://cpe5.ecm.example.com/wsi/FNCEWS40MTOM/

              RemoteServerUploadUrl = https://cpe5.ecm.example.com/wsi/FNCEWS40MTOM/

              RemoteServerDownloadUrl = https://cpe5.ecm.example.com/wsi/FNCEWS40MTOM/

              #

              CredentialsProtection =Clear

              CredentialsProtection/UserToken = Symmetric

              #

              jaasConfigurationName = FileNetP8WSI

              ###

               

               

              3. In /usr/share/jbossas/domain/configuration, create the following empty files: users.properties and roles.properties. They can be empty. The code expects it to exist.

               

               

              4. Create the following directory structure for the module on all host controllers:

              mkdir -p /usr/share/jbossas/modules/com/filenet/api/util/WSILoginModule/main.

               

               

              5. Copy the following files to /usr/share/jbossas/modules/com/filenet/api/util/WSILoginModule/main: Jace.jar, javaapi.jar, p8cjares.jar, stax-api.jar, xlxpScanner.jar, xlxpScannerUtils.jar.

               

               

              6. On all host controllers, in /usr/share/jbossas/modules/com/filenet/api/util/WSILoginModule/main, create the module.xml file.

               

               

              7. The module.xml file should look as follows:

               

               

              <module xmlns="urn:jboss:module:1.1" name="com.filenet.api.util.WSILoginModule">

                 <resources>

                      <resource-root path="Jace.jar"/>

                      <resource-root path="javaapi.jar"/>

                      <resource-root path="stax-api.jar"/>

                      <resource-root path="xlxpScanner.jar"/>

                      <resource-root path="xlxpScannerUtils.jar"/>

                      <resource-root path="p8cjares.jar"/>

                      <!-- any other resources here -->

                 </resources>

                 <dependencies>

                      <system export="true">

                          <paths>

                              <!-- any other paths here -->

                          </paths>

                      </system>

                      <module name="javax.api" export="true"/>

                      <module name="org.apache.log4j" export="true"/>

                      <module name="org.apache.xerces" export="true"/>

                 </dependencies>

              </module>

                  

              8. View the login-config.xml file obtained from EAP5:

               

               

              <application-policy name="FileNetP8WSI">

              <authentication>

                  <login-module code="com.filenet.api.util.WSILoginModule" flag="required"/>

              </authentication>

              </application-policy>

               

               

              In the EAP 6.4 Managed Domain, FileNetP8WSI will be the Security Policy name. See the following:

              <security-domain name="FileNetP8WSI" cache-type="default">

                <authentication>

                  <login-module code="com.filenet.api.util.WSILoginModule" flag="required"/>

                </authentication>

              </security-domain>

               

               

              To do this, either authenticate into the JBOSS Enterprise Application Platform Management Interface (JEAP) or the Management CLI Tool. I will explain how to do this using JEAP.

               

               

              9. In JEAP, Click the Configuration tab, select the Profile(we are using Default), and the expand the Security tree in the left pane. Select Security Domains and then click the Add button. Enter FileNetP8WSI in the Name field and then leave Cache at default unless you are using Infinispan, then choose it. Then click Save.

               

               

              10. Once the Security Policy has been created, click the View link in the Option column. Then click the Authentication link at the top and then the Add button in the Login Modules section. Enter com.filenet.api.util.WSILoginModule in the Code field and choose Required for the Flag. Then click Save.

               

               

              11. (Optional step - unverified). Click the Authorization link at the top and then click the Add button under the Details section. You will create two objects. For the first, enter usersProperties for the Key and users.properties for the Value. For the second, enter rolesProperties for the Key and roles.properties for the Value. While I did this, the objects do not show up unless I again click a button. I also do not see those objects in domain.xml.

               

               

              12. Restart the domain controller and all of the host controllers:

               

               

              systemctl stop jbossas-domain.service

              systemctl start jbossas-domain.service

              systemctl stop jbossas-host.service

              systemctl start jbossas-host.service

               

               

              13. Test your FileNet module functionality with your application.