1 Reply Latest reply on May 5, 2014 12:12 PM by endriju

    Set JDBC Realm on openshift

    mfe_

      Greetings,

       

      I'm trying to set up a JDBC Realm on openshift and I dont get it work.

      Thats a part of my standalone.xml configuration:

       

          <management>
              <security-realms>
                  <security-realm name="loginRealm">
                      <authentication>
                          <jaas name="login" />
                      </authentication>
      
                  </security-realm>
              </security-realms>
      
              <management-interfaces>
                  <native-interface security-realm="loginRealm">
                      <socket-binding native="management-native" />
                  </native-interface>
                  <http-interface security-realm="loginRealm">
                      <socket-binding http="management-http" />
                  </http-interface>
              </management-interfaces>
          </management>
      <subsystem xmlns="urn:jboss:domain:security:1.1">
                  <security-domains>
                      <security-domain name="login">
                          <authentication>
                              <login-module code="Database" flag="required">
                                  <module-option name="dsJndiName"
                                      value="java:jboss/datasources/MysqlDS" />
                                  <module-option name="principalsQuery"
                                      value="select PASSWORD from c_user where EMAIL=?" />
                                  <module-option name="rolesQuery"
                                      value="select groups_ROLENAME, 'Roles' from  c_user_c_user_role where User_EMAIL=?" />
                                  <module-option name="hashAlgorithm" value="SHA-256" />
                              </login-module>
                          </authentication>
                      </security-domain>
      
                      <security-domain name="other" cache-type="default">
                          <authentication>
                              <login-module code="UsersRoles" flag="required" />
                          </authentication>
                      </security-domain>
                  </security-domains>
              </subsystem>
      

       

      So I used in the configuration to set up the Realm with the <login-module> Element. The documentation tells me to use the Realm Tag which is confusing. I also don't get the proper Tags to nest the Realm Tag in. Anyway, I use this tutorial http://www.alesandro-lang.com/blog/setup_a_jdbc_realm_inside_openshift/  for setting my JDBC Realm up.

       

      Thats my jboss-web.xml

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

       

      and finally my web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
      
          <context-param>
              <description>Change to "Production" when you are ready to deploy
                  if (application.getProjectStage() == ProjectStage.Development)</description>
              <param-name>javax.faces.PROJECT_STAGE</param-name>
              <param-value>Development</param-value>
          </context-param>
              <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>
                  javax.faces.webapp.FacesServlet
              </servlet-class>
              <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
          </servlet-mapping>
          <!-- Welcome page -->
          <welcome-file-list>
              <welcome-file>index.jsf</welcome-file>
          </welcome-file-list>
          <session-config>
              <session-timeout>
                  30
              </session-timeout>
          </session-config>
      
           <security-constraint>
              <display-name>administration-constraint</display-name>
              <web-resource-collection>
                  <web-resource-name>administration</web-resource-name>
                  <description>authorisation area</description>
                  <url-pattern>/edit/*</url-pattern>
                  <http-method>GET</http-method>
                  <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                  <description/>
                  <role-name>headchef</role-name>
              </auth-constraint>
          </security-constraint>
          <login-config>
              <auth-method>FORM</auth-method>
              <realm-name>loginRealm</realm-name>
              <form-login-config>
                  <form-login-page>/viewLogin.jsf</form-login-page>
                  <form-error-page>/viewError.jsf</form-error-page>
              </form-login-config>
          </login-config>
          <security-role>
              <description>Administrator</description>
              <role-name>headchef</role-name>
          </security-role>
          <security-role>
              <description>normal user which can create recipes</description>
              <role-name>cook</role-name>
          </security-role>
      </web-app>
      
      
      

       

      When I access the protected administration the Loginpage (viewLogin.jsf) will not be shown. So the administration is still unprotected. There are also no Exceptions in the jboss logs. This is the log when starting jboss up.

       

      17:30:49,287 DEBUG [org.jboss.as.config] VM Arguments: -D[Standalone] -XX:+TieredCompilation -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=52fe28285973cad7a900033f -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=wiekocheich-getthesolution.rhcloud.com -Djgroups.bind_addr=127.9.64.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on -Duser.timezone=Europe/Vienna -Dorg.jboss.boot.log.file=/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/log/boot.log -Dlogging.configuration=file:/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/configuration/logging.properties 
      17:30:54,220 INFO  [org.xnio] XNIO Version 3.0.3.GA
      17:30:54,216 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
      17:30:54,320 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
      17:30:54,414 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
      17:30:54,535 INFO  [org.jboss.as.configadmin] JBAS016200: Activating ConfigAdmin Subsystem
      17:30:54,607 INFO  [org.jboss.as.jacorb] JBAS016300: Activating JacORB Subsystem
      17:30:54,590 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.
      17:30:54,711 INFO  [org.jboss.as.clustering.jgroups] JBAS010260: Activating JGroups subsystem.
      17:30:54,753 INFO  [org.jboss.as.security] JBAS013101: Activating Security Subsystem
      17:30:54,829 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:30:55,346 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final
      2014/03/11 17:30:55,420 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
      2014/03/11 17:30:55,645 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
      
      ==> jbossas/logs/audit.log <==
      17:30:56,185 TRACE [org.jboss.security.jacc.DelegatingPolicy] (MSC service thread 1-2) Loaded JACC permis
      ==> jbossas/logs/server.log <==
      2014/03/
      ==> jbossas/logs/audit.log <==
      sions: true
      
      ==> jbossas/logs/server.log <==
      11 17:30:56,240 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 34) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
      2014/03/11 17:30:56,276 INFO  [org.jboss.jaxr] (MSC service thread 1-4) JBAS014000: Started JAXR subsystem, binding JAXR connection factory into JNDI as: java:jboss/jaxr/ConnectionFactory
      2014/03/11 17:30:56,185 TRACE [org.jboss.security.jacc.DelegatingPolicy] (MSC service thread 1-2) Loaded JACC permissions: true
      
      ==> jbossas/logs/audit.log <==
      17:30:56,542 TRACE [org.jboss.security.jacc.DelegatingPolicy] (MSC service thread 1-2) loaded policy context classclass javax.security.jacc.PolicyContext
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:30:56,542 TRACE [org.jboss.security.jacc.DelegatingPolicy] (MSC service thread 1-2) loaded policy context classclass javax.security.jacc.PolicyContext
      2014/03/11 17:30:56,697 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
      2014/03/11 17:30:56,778 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 34) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
      2014/03/11 17:30:56,972 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 34) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 8.4)
      2014/03/11 17:30:57,364 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA
      2014/03/11 17:30:57,384 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.9.64.1-8080
      2014/03/11 17:30:57,986 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 38) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
      2014/03/11 17:30:58,113 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 38) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
      2014/03/11 17:30:58,694 INFO  [org.jboss.as.jacorb] (MSC service thread 1-1) JBAS016330: CORBA ORB Service started
      2014/03/11 17:30:58,852 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory /var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/deployments
      2014/03/11 17:30:58,890 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment ROOT.war
      2014/03/11 17:30:58,980 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.9.64.1:9999
      2014/03/11 17:30:58,979 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.9.64.1:4447
      
      ==> jbossas/logs/audit.log <==
      17:30:59,043 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (MSC service thread 1-1) CallbackHandler: org.jboss.security.auth.callback.JBossCallbackHandler@16c673e
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:30:59,043 TRACE [org.jboss.security.authentication.JBossCach
      ==> jbossas/logs/audit.log <==
      17:30:59,044 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (MSC s
      ==> jbossas/logs/server.log <==
      edAuthenticationManager] (MSC service
      ==> jbossas/logs/audit.log <==
      e
      ==> jbossas/logs/server.log <==
       thread 1-1) CallbackHandler: org.jboss.security.auth.callback.JBossCa
      ==> jbossas/logs/audit.log <==
      rvice thread 1-2) CallbackHandler: org.jboss.security.auth.callback.JBossCal
      ==> jbossas/logs/server.log <==
      llbackHandler@16c673e
      
      ==> jbossas/logs/audit.log <==
      lbackHandler@159314a
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:30:59,044 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (MSC service thread 1-2) CallbackHandler: org.jboss.security.auth.callback.JBossCallbackHandler@159314a
      2014/03/11 17:30:59,479 WARN  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011600: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
      2014/03/11 17:30:59,640 INFO  [org.jboss.as.jacorb] (MSC service thread 1-4) JBAS016328: CORBA Naming Service started
      2014/03/11 17:30:59,672 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
      2014/03/11 17:30:59,680 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/MysqlDS]
      2014/03/11 17:30:59,748 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/data/messagingjournal,bindingsDirectory=/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/data/messagingbindings,largeMessagesDirectory=/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/data/messaginglargemessages,pagingDirectory=/var/lib/openshift/52fe28285973cad7a900033f/jbossas/standalone/data/messagingpaging)
      2014/03/11 17:30:59,893 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) Waiting to obtain live lock
      2014/03/11 17:30:59,985 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-2) Using NIO Journal
      2014/03/11 17:31:00,257 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-2) Waiting to obtain live lock
      2014/03/11 17:31:00,304 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-2) Live Server Obtained live lock
      2014/03/11 17:31:01,511 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-2) Started Netty Acceptor version 3.2.5.Final-a96d88c 127.9.64.1:5455 for CORE protocol
      2014/03/11 17:31:01,557 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-2) Started Netty Acceptor version 3.2.5.Final-a96d88c 127.9.64.1:5445 for CORE protocol
      2014/03/11 17:31:01,647 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) Server is now live
      2014/03/11 17:31:01,700 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) HornetQ Server version 2.2.13.Final (HQ_2_2_13_FINAL_AS7, 122) [957b3c9c-9584-11e3-a874-12313d2f8db0]) started
      2014/03/11 17:31:01,810 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) trying to deploy queue jms.queue.testQueue
      2014/03/11 17:31:01,891 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:/queue/test
      2014/03/11 17:31:01,927 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/queue/test
      2014/03/11 17:31:02,110 INFO  [org.jboss.as.messaging] (MSC service thread 1-3) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
      2014/03/11 17:31:02,150 INFO  [org.jboss.as.messaging] (MSC service thread 1-3) JBAS011601: Bound messaging object to jndi name java:/RemoteConnectionFactory
      2014/03/11 17:31:02,181 INFO  [org.jboss.as.messaging] (MSC service thread 1-4) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
      2014/03/11 17:31:02,211 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) trying to deploy queue jms.topic.testTopic
      2014/03/11 17:31:02,468 INFO  [org.jboss.as.messaging] (MSC service thread 1-1) JBAS011601: Bound messaging object to jndi name java:/topic/test
      2014/03/11 17:31:02,522 INFO  [org.jboss.as.messaging] (MSC service thread 1-1) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/topic/test
      2014/03/11 17:31:02,721 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010406: Registered connection factory java:/JmsXA
      2014/03/11 17:31:02,944 INFO  [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-2) HornetQ resource adaptor started
      2014/03/11 17:31:02,946 INFO  [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-2) IJ020002: Deployed: file://RaActivatorhornetq-ra
      2014/03/11 17:31:03,057 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
      ==> jbossas/logs/audit.log <==
      17:31:15,408 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-4) nextState(getPolicyConfiguration) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:15,408 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-4) nextState(getPolicyConfiguration) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      
      ==> jbossas/logs/audit.log <==
      17:31:15,542 TRACE [org.jboss.security.jacc.JBossPolicyConfiguration] (MSC service thread 1-4) ctor, contextID=ROOT.war
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:15,542 TRACE [org.jboss.security.jacc.JBossPolicyConfiguration] (MSC service thread 1-4) ctor, contextID=ROOT.war
      
      ==> jbossas/logs/audit.log <==
      17:31:15,573 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-4) nextState(getPolicyConfiguration) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:15,573 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-4) nextState(getPolicyConfiguration) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      2014/03/11 17:31:16,018 INFO  [org.hibernate.annotations.common.Version] (MSC service threa
      ==> jbossas/logs/audit.log <==
      17:31:16,133 TRACE [org.jboss.security.jacc.JBossPolicyConfigurat
      ==> jbossas/logs/server.log <==
      d 1-2) HCANN000001: Hibernate Commons Annotatio
      ==> jbossas/logs/audit.log <==
      ion] (MSC service thread 1-4) commit:ROOT.war
      
      ==> jbossas/logs/server.log <==
      ns {4.0.1.Final}
      2014/03/11 17:31:16,163 INFO  [org.hibernate.Version] (MSC service thread 1-2) HHH000412: Hibernate Core {4.0.1.Final}
      2014/03/11 17:31:16,133 TRACE [org.jboss.security.jacc.JBossPolicyConfiguration] (MSC service thread 1-4) commit:ROOT.war
      2
      ==> jbossas/logs/audit.log <==
      17:31:16,208 TRACE [org.jboss.se
      ==> jbossas/logs/server.log <==
      0
      ==> jbossas/logs/server.log <==
      INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000021: Bytecode provider name : javassist
      2014/03/11 17:31:16,208 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-4) nextState(commit) = State(name=inService
           on: getContextID go to: inService
           on: inService go to: inService
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open)
      2014/03/11 17:31:16,449 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [
          name: wie-koche-ichPU
          ...]
      2014/03/11 17:31:17,101 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-2) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      2014/03/11 17:31:18,565 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-2) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
      2014/03/11 17:31:18,713 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-2) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
      2014/03/11 17:31:18,798 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-2) HHH000397: Using ASTQueryTranslatorFactory
      2014/03/11 17:31:18,904 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-2) Hibernate Validator 4.2.0.Final
      2014/03/11 17:31:20,275 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.9.64.1:9990
      2014/03/11 17:31:20,300 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 33905ms - Started 387 of 511 services (3 services failed or missing dependencies, 118 services are passive or on-demand)
      2014/03/11 17:31:20,481 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ROOT.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./ROOT.realmjboss.securi
      ==> jbossas/logs/audit.log <==
      17:31:20,517 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-2) nextState(getPolicyConfiguratio
      ==> jbossas/logs/server.log <==
      ty.security-domain.loginRealmMissing[jboss.web.deployment.default-host./ROOT.realmjboss.security.security-domain.loginRealm]"]}
      2014/03/11 17:31:20,522 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011403: Stopping Persistence Unit Service 'ROOT.war#wie-koche-ichPU'
      
      ==> jbossas/logs/audit.log <==
      n) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:20,517 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-2) nextState(getPolicyConfiguration) = State(name=open
           on: addToExcludedPolicy go to: open
           on: inService go to: open
           on: getContextID go to: open
           on: removeExcludedPolicy go to: open
           on: commit go to: inService
           on: removeRole go to: open
           on: addToUncheckedPolicy go to: open
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open
           on: addToRole go to: open
           on: linkConfiguration go to: open
           on: removeUncheckedPolicy go to: open)
      
      ==> jbossas/logs/audit.log <==
      17:31:20,767 TRACE [org.jboss.security.jacc.JBossPolicyConfiguration] (MSC service thread 1-2) delete:ROOT.war
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:20,767 TRACE [org.jboss.security.jacc.JBossPolicyConfiguration] (MSC service thread 1-2) delete:ROOT.war
      
      ==> jbossas/logs/audit.log <==
      17:31:20,919 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-2) nextState(delete) = State(name=deleted
           on: inService go to: deleted
           on: getContextID go to: deleted
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open)
      
      ==> jbossas/logs/server.log <==
      2014/03/11 17:31:20,919 TRACE [org.jboss.security.util.state.StateMachine] (MSC service thread 1-2) nextState(delete) = State(name=deleted
           on: inService go to: deleted
           on: getContextID go to: deleted
           on: delete go to: deleted
           on: getPolicyConfiguration go to: open)
      2014/03/11 17:31:21,511 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment ROOT.war in 1027ms
      2014/03/11 17:31:21,590 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
            service jboss.security.security-domain.loginRealm (missing) dependents: [service jboss.web.deployment.default-host./ROOT.realm]
      
      2014/03/11 17:31:21,764 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./ROOT.realmjboss.security.security-domain.loginRealmMissing[jboss.web.deployment.default-host./ROOT.realmjboss.security.security-domain.loginRealm]"]}}}
      
      

       

      I tried many tutorials but none of them worked for me. Can someone tell me what wrong with my configuration?