1 Reply Latest reply on Jun 3, 2013 6:00 AM by erasmomarciano

    JAAS config on Jboss 6

    sirair

      Hi all,

       

       

      I want to run JAAS on Jboss 6, but I get an exception when starting server.

       

      15:24:15,467 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfs:///C:/Users/md/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.x_Runtime_Server1366663323539/deploy/JAAS_EVALUATION.war state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///C:/Users/sascha/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.x_Runtime_Server1366663323539/deploy/JAAS_EVALUATION.war
      ...
      
      

      Here are my configs:

       

       

      server.xml


      <?xml version="1.0" encoding="UTF-8"?>
      <?xml version="1.0" encoding="UTF-8"?>
      <Context>
          <Realm className="org.apache.catalina.realm.JAASRealm" appName="JAAS_EVALUATION" />
      </Context>
      
      

       

       

      jboss-web.xml

       

      <jboss-web>
          <security-domain>java:/jaas/testLogin</security-domain>
      </jboss-web>
      
      

       

       

      web.xml

       

       

      <webapp>
      
          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>All resources</web-resource-name>
                  <description>Protects all resources</description>
                  <url-pattern>/admin/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                  <role-name>md</role-name>
              </auth-constraint>
          </security-constraint>
      
          <security-role>
              <role-name>md</role-name>
          </security-role>
      
          <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>Test Realm</realm-name>
          </login-config>
      
      </webapp>
      
      

       

       

       

      login-config.xml

       

       

      <application-policy name="testLogin">
          <authentication>
            <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
              flag="required">
              <module-option name="usersProperties">users.properties</module-option>
              <module-option name="rolesProperties">roles.properties</module-option>
            </login-module>
          </authentication>
        </application-policy>
      
      
        • 1. Re: JAAS config on Jboss 6
          erasmomarciano

          Hi

           

          You can do a check this topic https://community.jboss.org/thread/154023

           

          Has suggest Wolfgang Knauf

           

          seems your war file contains a xml parser. This is a known problem with JBoss: it contains its own xml parser, and thus a parser in a deployed application results in exceptions.

           

          If possible remove all xml parser related jar files.

          If this is not possible, you might play around with classloader configuration. I don't have a link now, but google will help you ;-)