9 Replies Latest reply on Dec 5, 2014 11:24 PM by saurabh200

    Facing major issue in setting up security-domain configuration

    soranki

      Below is my standalone.xml in which I have few configurations set. And when I am starting my both applications with the below command I am getting the error.

       

      standalone.sh -c standalone-ha.xml -Djboss.node.name=NodeA -b 192.168.0.118  -Djboss.socket.binding.port-offset=100

      standalone.sh -c standalone-ha.xml -Djboss.node.name=NodeB -b 192.168.0.118  -Djboss.socket.binding.port-offset=200

       

       

      ERROR :

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.security.security-domain.mysqldomain (missing) dependents: [service jboss.web.deployment.default-host./OceanView.realm]

       

       

      15:29:14,008 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was rolled back

      15:29:14,018 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./OceanView.realmjboss.security.security-domain.mysqldomainMissing[jboss.web.deployment.default-host./OceanView.realmjboss.security.security-domain.mysqldomain]"]}}}

       

       

      I am getting the same error in both the Jboss instances.

       

      A quick look at the below configuration value from  standalone.xml might be of any help

       

      <security-domains>

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

                          <authentication>

                              <login-module code="Remoting" flag="optional">

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                              <login-module code="RealmUsersRoles" flag="required">

                                  <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                  <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                                  <module-option name="realm" value="ApplicationRealm"/>

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                          </authentication>

                      </security-domain>

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

                          <authentication>

                              <login-module code="Database" flag="required">

                                  <module-option name="dsJndiName" value="java:jboss/datasources/Logit-DS"/>

                                  <module-option name="principalsQuery" value="select UAC_PASSWORD from USER_ACCOUNT where UAC_NAME=?"/>

                                  <module-option name="rolesQuery" value="select URO_ROLENAME,'Roles' from USER_ROLE where URO_ID in (select uu.URO_ID from USER_ACCOUNT ua join useraccount_userrole uu on ua.id=uu.UAC_ID where ua.UAC_NAME=?)"/>

                                  <module-option name="hashAlgorithm" value="MD5"/>

                                  <module-option name="hashEncoding" value="BASE64"/>

                                  <module-option name="hashStorePassword" value="true"/>

                              </login-module>

                          </authentication>

                      </security-domain>

                      <security-domain name="jboss-web-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                      <security-domain name="jboss-ejb-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                  </security-domains>

              </subsystem>

       

       

      So please help me out in overcoming this issue.

        • 1. Re: Facing major issue in setting up security-domain configuration
          jaysensharma

          The above error indicates that your application "OceanView" is referring to Security-domain  "mysqldomain".   But the security-domain  is actually not configured on your jboss profile.

           

          I can reproduce this issue  by  configuring the security-domain  on "standlaone.xml"  profile  and by starting the JBoss using  "standalone-ha.xml" (where the security-domain does not exist.)

           

          IN your case you have configured it in standalone.xml (as the snippet says) and you are trying to start it using

           

          standalone.sh -c standalone-ha.xml -Djboss.node.name=NodeA -b 192.168.0.118  -Djboss.socket.binding.port-offset=100

          • 2. Re: Facing major issue in setting up security-domain configuration
            soranki

            So you want me to add the following  in standalone-ha.xml

             

            Existing One :

             

            <security-domains>

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

                                <authentication>

                                    <login-module code="Remoting" flag="optional">

                                        <module-option name="password-stacking" value="useFirstPass"/>

                                    </login-module>

                                    <login-module code="RealmUsersRoles" flag="required">

                                        <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                        <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                                        <module-option name="realm" value="ApplicationRealm"/>

                                        <module-option name="password-stacking" value="useFirstPass"/>

                                    </login-module>

                                </authentication>

                            </security-domain>

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

                                <authentication>

                                    <login-module code="Database" flag="required">

                                        <module-option name="dsJndiName" value="java:jboss/datasources/Logit-DS"/>

                                        <module-option name="principalsQuery" value="select UAC_PASSWORD from USER_ACCOUNT where UAC_NAME=?"/>

                                        <module-option name="rolesQuery" value="select URO_ROLENAME,'Roles' from USER_ROLE where URO_ID in (select uu.URO_ID from USER_ACCOUNT ua join useraccount_userrole uu on ua.id=uu.UAC_ID where ua.UAC_NAME=?)"/>

                                        <module-option name="hashAlgorithm" value="MD5"/>

                                        <module-option name="hashEncoding" value="BASE64"/>

                                        <module-option name="hashStorePassword" value="true"/>

                                    </login-module>

                                </authentication>

                            </security-domain>

                            <security-domain name="jboss-web-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                            <security-domain name="jboss-ejb-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                        </security-domains>

                    </subsystem>

             

            (OR)

             

            New One :

             

            <subsystem xmlns="urn:jboss:domain:security:1.0"> 

                <security-domains> 

                    <security-domain name="other"> 

                        <authentication> 

                            <login-module code="UsersRoles" flag="required" /> 

                        </authentication> 

                    </security-domain> 

             

                   <security-domain name="form-auth" cache-type="default"> 

                                <authentication> 

                                   <login-module code="UsersRoles" flag="required"> 

                                        <module-option name="usersProperties" value="users.properties"/> 

                                        <module-option name="rolesProperties" value="roles.properties"/> 

                                    </login-module> 

                                </authentication> 

                            </security-domain> 

                </security-domains> 

                <security-properties> 

                  <property name="a" value="b" /> 

                  <property name="c" value="d" /> 

                </security-properties> 

            </subsystem>

             

            As far as I understand I should add the New One  into standalone.xml and both Existing One : and New One : should be added in standalone-ha.xml

            • 3. Re: Re: Facing major issue in setting up security-domain configuration
              jaysensharma

              I am not sure why are you referring to a security domain "form-auth"  When JBoss is complaining about security-domain "mysqldomain" is missing.

               

              As you are using  standalone-ha.xml  for clustering purpose, hence  there is no point in discussing what you have in standalone.xml.

               

              What i wanted to say in my previous update that your security-domain  configuration "mysqldomain" looks fine to me configuration wise.    The only thing is that you should put it in the profile which you are running. (means inside the standalone-ha.xml) file.  So to avoid the following Error , you should place the following security domain "mysqldomain" inside the "standalone-ha.xml" file:

               

              [{"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./OceanView.realmjboss.security.security-domain.mysqldomainMissing[jboss.web.deployment.default-host./OceanView.realmjboss.security.security-domain.mysqldomain]"]}}}]

               

                              <security-domain name="mysqldomain" cache-type="default">
                                  <authentication>
                                      <login-module code="Database" flag="required">
                                          <module-option name="dsJndiName" value="java:jboss/datasources/Logit-DS"/>
                                          <module-option name="principalsQuery" value="select UAC_PASSWORD from USER_ACCOUNT where UAC_NAME=?"/>
                                          <module-option name="rolesQuery" value="select URO_ROLENAME,'Roles' from USER_ROLE where URO_ID in (select uu.URO_ID from USER_ACCOUNT ua join useraccount_userrole uu on ua.id=uu.UAC_ID where ua.UAC_NAME=?)"/>
                                          <module-option name="hashAlgorithm" value="MD5"/>
                                          <module-option name="hashEncoding" value="BASE64"/>
                                          <module-option name="hashStorePassword" value="true"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
              
              
              

               

               

               

              If you  still face any issue then it will be better to attach the correct standalone-ha.xml (which you are using)  along with the respective server log.

              • 4. Re: Re: Facing major issue in setting up security-domain configuration
                soranki

                https://developer.jboss.org/wiki/Standalone-haxml

                https://developer.jboss.org/wiki/Serverlog

                 

                You can please go through the above links where I have uploaded my standalone-ha.xml and the server logs as well.

                • 5. Re: Re: Re: Facing major issue in setting up security-domain configuration
                  jaysensharma

                  Abhishek,

                   

                      You do not need to attach a file in a separate new thread. You can simply click on the "Use advanced editor" link at the top right corner of your rich text area where you type your comments.  Once you click on that link then you will find  "Attach"  link in the same rich text area at the right bottom side.

                   

                   

                   

                  In your latest server.log  i do not see the issue which you reported in your thread description now.  Which means your "mysqldomain" domain is configured properly.

                   

                  JBAS014775:    New missing/unsatisfied dependencies:
                        service jboss.security.security-domain.mysqldomain (missing) dependents: [service jboss.web.deployment.default-host./OceanView.realm]
                  

                   

                   

                  But i see the following Error in your log:

                  
                  
                  
                  JBAS014775:
                  New missing/unsatisfied dependencies: 
                  
                  
                    
                  service jboss.security.security-domain.other (missing) dependents: [service jboss.messaging.default] 
                  
                  
                  
                  
                  
                  JBAS015870: Deploy of deployment "ClusterWebApp.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./ClusterWebApp.realmjboss.security.security-domain.otherMissing[jboss.web.deployment.default-host./ClusterWebApp.realmjboss.security.security-domain.other]"]}
                  
                  
                  

                   

                   

                  Which is because you have removed the "other" secutiry domain from your standalone-ha.xml profile which is the default security domain available for any application.  Like ClusterWebApp.war. So put that domain back in your standalone-ha.xml file.  As following:

                   

                  <security-domain name="other" cache-type="default">
                                      <authentication>
                                          <login-module code="Remoting" flag="optional">
                                              <module-option name="password-stacking" value="useFirstPass"/>
                                          </login-module>
                                          <login-module code="RealmUsersRoles" flag="required">
                                              <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
                                              <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
                                              <module-option name="realm" value="ApplicationRealm"/>
                                              <module-option name="password-stacking" value="useFirstPass"/>
                                          </login-module>
                                      </authentication>
                                  </security-domain>
                  
                  • 6. Re: Re: Re: Facing major issue in setting up security-domain configuration
                    soranki

                    I am not able to find the Use advanced editor Hence I am pasting below the error :

                     

                    19:13:09,877 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

                    19:13:10,027 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

                    19:13:10,067 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

                    19:13:10,909 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration

                            at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                            at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

                    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[458,5]

                    Message: JBAS014789: Unexpected element '{urn:jboss:domain:security:1.1}security-domain' encountered

                            at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:85) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.security.SecuritySubsystemParser.readElement(SecuritySubsystemParser.java:133) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.security.SecuritySubsystemParser.readElement(SecuritySubsystemParser.java:63) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:894) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_1(StandaloneXml.java:330) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:127) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:100) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                            ... 3 more

                     

                     

                    19:13:10,919 FATAL [org.jboss.as.server] JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

                    19:13:10,929 INFO  [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 4ms

                    Press any key to continue . . .

                    C:\Abhi1\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\bin>

                     

                     

                     

                    Also please find the stanalone-ha.xml below as I am not able to find the Use Advanced Editor as stated above.

                     

                    <?xml version='1.0' encoding='UTF-8'?>

                     

                     

                    <server xmlns="urn:jboss:domain:1.2">

                     

                     

                        <extensions>

                            <extension module="org.jboss.as.clustering.infinispan"/>

                            <extension module="org.jboss.as.clustering.jgroups"/>

                            <extension module="org.jboss.as.cmp"/>

                            <extension module="org.jboss.as.configadmin"/>

                            <extension module="org.jboss.as.connector"/>

                            <extension module="org.jboss.as.deployment-scanner"/>

                            <extension module="org.jboss.as.ee"/>

                            <extension module="org.jboss.as.ejb3"/>

                            <extension module="org.jboss.as.jacorb"/>

                            <extension module="org.jboss.as.jaxr"/>

                            <extension module="org.jboss.as.jaxrs"/>

                            <extension module="org.jboss.as.jdr"/>

                            <extension module="org.jboss.as.jmx"/>

                            <extension module="org.jboss.as.jpa"/>

                            <extension module="org.jboss.as.jsr77"/>

                            <extension module="org.jboss.as.logging"/>

                            <extension module="org.jboss.as.mail"/>

                            <extension module="org.jboss.as.messaging"/>

                            <extension module="org.jboss.as.modcluster"/>

                            <extension module="org.jboss.as.naming"/>

                            <extension module="org.jboss.as.osgi"/>

                            <extension module="org.jboss.as.pojo"/>

                            <extension module="org.jboss.as.remoting"/>

                            <extension module="org.jboss.as.sar"/>

                            <extension module="org.jboss.as.security"/>

                            <extension module="org.jboss.as.threads"/>

                            <extension module="org.jboss.as.transactions"/>

                            <extension module="org.jboss.as.web"/>

                            <extension module="org.jboss.as.webservices"/>

                            <extension module="org.jboss.as.weld"/>

                        </extensions>

                     

                     

                        <management>

                            <security-realms>

                                <security-realm name="ManagementRealm">

                                    <authentication>

                                        <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                                    </authentication>

                                </security-realm>

                                <security-realm name="ApplicationRealm">

                                    <authentication>

                                        <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                                    </authentication>

                                </security-realm>

                            </security-realms>

                            <management-interfaces>

                                <native-interface security-realm="ManagementRealm">

                                    <socket-binding native="management-native"/>

                                </native-interface>

                                <http-interface security-realm="ManagementRealm">

                                    <socket-binding http="management-http"/>

                                </http-interface>

                            </management-interfaces>

                        </management>

                     

                     

                        <profile>

                            <subsystem xmlns="urn:jboss:domain:logging:1.1">

                                <console-handler name="CONSOLE">

                                    <level name="INFO"/>

                                    <formatter>

                                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                    </formatter>

                                </console-handler>

                                <periodic-rotating-file-handler name="FILE">

                                    <formatter>

                                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                    </formatter>

                                    <file relative-to="jboss.server.log.dir" path="server.log"/>

                                    <suffix value=".yyyy-MM-dd"/>

                                    <append value="true"/>

                                </periodic-rotating-file-handler>

                                <logger category="com.arjuna">

                                    <level name="WARN"/>

                                </logger>

                                <logger category="org.apache.tomcat.util.modeler">

                                    <level name="WARN"/>

                                </logger>

                                <logger category="sun.rmi">

                                    <level name="WARN"/>

                                </logger>

                                <logger category="jacorb">

                                    <level name="WARN"/>

                                </logger>

                                <logger category="jacorb.config">

                                    <level name="ERROR"/>

                                </logger>

                                <root-logger>

                                    <level name="INFO"/>

                                    <handlers>

                                        <handler name="CONSOLE"/>

                                        <handler name="FILE"/>

                                    </handlers>

                                </root-logger>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                                <datasources>

                                    <datasource jndi-name="java:jboss/datasources/Logit-DS" pool-name="Logit-DS" enabled="true" use-java-context="true">

                                        <connection-url>jdbc:jtds:sqlserver://localhost:1433/DHL_JB7;loginTimeout=30</connection-url>

                                        <driver>jtds</driver>

                                        <security>

                                            <user-name>DHL</user-name>

                                            <password>K_zo83TBT</password>

                                        </security>

                                    </datasource>

                                    <drivers>

                                        <driver name="jtds" module="net.sourceforge.jtds">

                     

                     

                                            <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>

                                        </driver>

                                    </drivers>

                                </datasources>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

                                <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                                <session-bean>

                                    <stateless>

                                        <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                                    </stateless>

                                    <stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="clustered"/>

                                    <singleton default-access-timeout="5000"/>

                                </session-bean>

                                <mdb>

                                    <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                                    <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                                </mdb>

                                <pools>

                                    <bean-instance-pools>

                                        <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                        <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                    </bean-instance-pools>

                                </pools>

                                <caches>

                                    <cache name="simple" aliases="NoPassivationCache"/>

                                    <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                                    <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>

                                </caches>

                                <passivation-stores>

                                    <file-passivation-store name="file"/>

                                    <cluster-passivation-store name="infinispan" cache-container="ejb"/>

                                </passivation-stores>

                                <async thread-pool-name="default"/>

                                <timer-service thread-pool-name="default">

                                    <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                                </timer-service>

                                <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                                <thread-pools>

                                    <thread-pool name="default">

                                        <max-threads count="10"/>

                                        <keepalive-time time="100" unit="milliseconds"/>

                                    </thread-pool>

                                </thread-pools>

                                <iiop enable-by-default="false" use-qualified-name="false"/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="cluster">

                                <cache-container name="cluster" aliases="ha-partition" default-cache="default">

                                    <transport lock-timeout="60000"/>

                                    <replicated-cache name="default" mode="SYNC" batching="true">

                                        <locking isolation="REPEATABLE_READ"/>

                                    </replicated-cache>

                                </cache-container>

                                <cache-container name="web" aliases="standard-session-cache" default-cache="repl">

                                    <transport lock-timeout="60000"/>

                                    <replicated-cache name="repl" mode="ASYNC" batching="true">

                                        <file-store/>

                                    </replicated-cache>

                                    <replicated-cache name="sso" mode="SYNC" batching="true"/>

                                    <distributed-cache name="dist" mode="ASYNC" batching="true">

                                        <file-store/>

                                    </distributed-cache>

                                </cache-container>

                                <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">

                                    <transport lock-timeout="60000"/>

                                    <replicated-cache name="repl" mode="ASYNC" batching="true">

                                        <eviction strategy="LRU"/>

                                        <file-store/>

                                    </replicated-cache>

                                    <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>

                                    <distributed-cache name="dist" mode="ASYNC" batching="true">

                                        <eviction strategy="LRU"/>

                                        <file-store/>

                                    </distributed-cache>

                                </cache-container>

                                <cache-container name="hibernate" default-cache="local-query">

                                    <transport lock-timeout="60000"/>

                                    <local-cache name="local-query">

                                        <transaction mode="NONE"/>

                                        <eviction strategy="LRU" max-entries="10000"/>

                                        <expiration max-idle="100000"/>

                                    </local-cache>

                                    <invalidation-cache name="entity" mode="SYNC">

                                        <transaction mode="NON_XA"/>

                                        <eviction strategy="LRU" max-entries="10000"/>

                                        <expiration max-idle="100000"/>

                                    </invalidation-cache>

                                    <replicated-cache name="timestamps" mode="ASYNC">

                                        <transaction mode="NONE"/>

                                        <eviction strategy="NONE"/>

                                    </replicated-cache>

                                </cache-container>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jacorb:1.1">

                                <orb>

                                    <initializers security="on" transactions="spec"/>

                                </orb>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jaxr:1.1">

                                <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/>

                                <properties/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:jca:1.1">

                                <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                                <bean-validation enabled="true"/>

                                <default-workmanager>

                                    <short-running-threads>

                                        <core-threads count="50"/>

                                        <queue-length count="50"/>

                                        <max-threads count="50"/>

                                        <keepalive-time time="10" unit="seconds"/>

                                    </short-running-threads>

                                    <long-running-threads>

                                        <core-threads count="50"/>

                                        <queue-length count="50"/>

                                        <max-threads count="50"/>

                                        <keepalive-time time="10" unit="seconds"/>

                                    </long-running-threads>

                                </default-workmanager>

                                <cached-connection-manager/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="udp">

                                <stack name="udp">

                                    <transport type="UDP" socket-binding="jgroups-udp" diagnostics-socket-binding="jgroups-diagnostics"/>

                                    <protocol type="PING"/>

                                    <protocol type="MERGE2"/>

                                    <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

                                    <protocol type="FD"/>

                                    <protocol type="VERIFY_SUSPECT"/>

                                    <protocol type="BARRIER"/>

                                    <protocol type="pbcast.NAKACK"/>

                                    <protocol type="UNICAST2"/>

                                    <protocol type="pbcast.STABLE"/>

                                    <protocol type="pbcast.GMS"/>

                                    <protocol type="UFC"/>

                                    <protocol type="MFC"/>

                                    <protocol type="FRAG2"/>

                                </stack>

                                <stack name="tcp">

                                    <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>

                                    <protocol type="MPING" socket-binding="jgroups-mping"/>

                                    <protocol type="MERGE2"/>

                                    <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                                    <protocol type="FD"/>

                                    <protocol type="VERIFY_SUSPECT"/>

                                    <protocol type="BARRIER"/>

                                    <protocol type="pbcast.NAKACK"/>

                                    <protocol type="UNICAST2"/>

                                    <protocol type="pbcast.STABLE"/>

                                    <protocol type="pbcast.GMS"/>

                                    <protocol type="UFC"/>

                                    <protocol type="MFC"/>

                                    <protocol type="FRAG2"/>

                                </stack>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jmx:1.1">

                                <show-model value="true"/>

                                <remoting-connector/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                                <jpa default-datasource=""/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:mail:1.0">

                                <mail-session jndi-name="java:jboss/mail/Default">

                                    <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                                </mail-session>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                                <hornetq-server>

                                    <clustered>true</clustered>

                                    <persistence-enabled>true</persistence-enabled>

                                    <journal-file-size>102400</journal-file-size>

                                    <journal-min-files>2</journal-min-files>

                     

                     

                                    <connectors>

                                        <netty-connector name="netty" socket-binding="messaging"/>

                                        <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                            <param key="batch-delay" value="50"/>

                                        </netty-connector>

                                        <in-vm-connector name="in-vm" server-id="0"/>

                                    </connectors>

                     

                     

                                    <acceptors>

                                        <netty-acceptor name="netty" socket-binding="messaging"/>

                                        <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                            <param key="batch-delay" value="50"/>

                                            <param key="direct-deliver" value="false"/>

                                        </netty-acceptor>

                                        <in-vm-acceptor name="in-vm" server-id="0"/>

                                    </acceptors>

                     

                     

                                    <broadcast-groups>

                                        <broadcast-group name="bg-group1">

                                            <group-address>231.7.7.7</group-address>

                                            <group-port>9876</group-port>

                                            <broadcast-period>5000</broadcast-period>

                                            <connector-ref>

                                                netty

                                            </connector-ref>

                                        </broadcast-group>

                                    </broadcast-groups>

                     

                     

                                    <discovery-groups>

                                        <discovery-group name="dg-group1">

                                            <group-address>231.7.7.7</group-address>

                                            <group-port>9876</group-port>

                                            <refresh-timeout>10000</refresh-timeout>

                                        </discovery-group>

                                    </discovery-groups>

                     

                     

                                    <cluster-connections>

                                        <cluster-connection name="my-cluster">

                                            <address>jms</address>

                                            <connector-ref>netty</connector-ref>

                                            <discovery-group-ref discovery-group-name="dg-group1"/>

                                        </cluster-connection>

                                    </cluster-connections>

                     

                     

                                    <security-settings>

                                        <security-setting match="#">

                                            <permission type="send" roles="guest"/>

                                            <permission type="consume" roles="guest"/>

                                            <permission type="createNonDurableQueue" roles="guest"/>

                                            <permission type="deleteNonDurableQueue" roles="guest"/>

                                        </security-setting>

                                    </security-settings>

                     

                     

                                    <address-settings>

                                        <address-setting match="#">

                                            <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                            <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                            <redelivery-delay>0</redelivery-delay>

                                            <max-size-bytes>10485760</max-size-bytes>

                                            <address-full-policy>BLOCK</address-full-policy>

                                            <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                            <redistribution-delay>1000</redistribution-delay>

                                        </address-setting>

                                    </address-settings>

                     

                     

                                    <jms-connection-factories>

                                        <connection-factory name="InVmConnectionFactory">

                                            <connectors>

                                                <connector-ref connector-name="in-vm"/>

                                            </connectors>

                                            <entries>

                                                <entry name="java:/ConnectionFactory"/>

                                            </entries>

                                        </connection-factory>

                                        <connection-factory name="RemoteConnectionFactory">

                                            <connectors>

                                                <connector-ref connector-name="netty"/>

                                            </connectors>

                                            <entries>

                                                <entry name="RemoteConnectionFactory"/>

                                                <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                            </entries>

                                        </connection-factory>

                                        <pooled-connection-factory name="hornetq-ra">

                                            <transaction mode="xa"/>

                                            <connectors>

                                                <connector-ref connector-name="in-vm"/>

                                            </connectors>

                                            <entries>

                                                <entry name="java:/JmsXA"/>

                                            </entries>

                                        </pooled-connection-factory>

                                    </jms-connection-factories>

                     

                     

                                    <jms-destinations>

                                        <jms-queue name="testQueue">

                                            <entry name="queue/test"/>

                                            <entry name="java:jboss/exported/jms/queue/test"/>

                                        </jms-queue>

                                        <jms-topic name="testTopic">

                                            <entry name="topic/test"/>

                                            <entry name="java:jboss/exported/jms/topic/test"/>

                                        </jms-topic>

                                    </jms-destinations>

                                </hornetq-server>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:modcluster:1.0">

                                <mod-cluster-config advertise-socket="modcluster">

                                    <dynamic-load-provider>

                                        <load-metric type="busyness"/>

                                    </dynamic-load-provider>

                                </mod-cluster-config>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:naming:1.1"/>

                            <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">

                                <properties>

                                    <property name="org.osgi.framework.startlevel.beginning">

                                        1

                                    </property>

                                </properties>

                                <capabilities>

                                    <capability name="javax.servlet.api:v25"/>

                                    <capability name="javax.transaction.api"/>

                                    <capability name="org.apache.felix.log" startlevel="1"/>

                                    <capability name="org.jboss.osgi.logging" startlevel="1"/>

                                    <capability name="org.apache.felix.configadmin" startlevel="1"/>

                                    <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>

                                </capabilities>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                                <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                            <subsystem xmlns="urn:jboss:domain:security:1.1">

                     

                      <security-domains>

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

                                        <authentication> 

                                            <login-module code="Database" flag="required"> 

                                                <module-option name="dsJndiName" value="java:jboss/datasources/Logit-DS"/> 

                                                <module-option name="principalsQuery" value="select UAC_PASSWORD from USER_ACCOUNT where UAC_NAME=?"/> 

                                                <module-option name="rolesQuery" value="select URO_ROLENAME,'Roles' from USER_ROLE where URO_ID in (select uu.URO_ID from USER_ACCOUNT ua join useraccount_userrole uu on ua.id=uu.UAC_ID where ua.UAC_NAME=?)"/> 

                                                <module-option name="hashAlgorithm" value="MD5"/> 

                                                <module-option name="hashEncoding" value="BASE64"/> 

                                                <module-option name="hashStorePassword" value="true"/> 

                                            </login-module> 

                                        </authentication> 

                                    </security-domain>

                      <security-domain name="jboss-web-policy" cache-type="default">

                                        <authorization>

                                            <policy-module code="Delegating" flag="required"/>

                                        </authorization>

                                    </security-domain>

                                    <security-domain name="jboss-ejb-policy" cache-type="default">

                                        <authorization>

                                            <policy-module code="Delegating" flag="required"/>

                                        </authorization>

                                    </security-domain>

                      </security-domains>

                     

                     

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

                                        <authentication> 

                                            <login-module code="Remoting" flag="optional"> 

                                                <module-option name="password-stacking" value="useFirstPass"/> 

                                            </login-module> 

                                            <login-module code="RealmUsersRoles" flag="required"> 

                                                <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/> 

                                                <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/> 

                                                <module-option name="realm" value="ApplicationRealm"/> 

                                                <module-option name="password-stacking" value="useFirstPass"/> 

                                            </login-module> 

                                        </authentication> 

                                    </security-domain> 

                     

                     

                                <!--<security-domains>

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

                                        <authentication>

                                            <login-module code="Remoting" flag="optional">

                                                <module-option name="password-stacking" value="useFirstPass"/>

                                            </login-module>

                                            <login-module code="RealmUsersRoles" flag="required">

                                                <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                                <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                                                <module-option name="realm" value="ApplicationRealm"/>

                                                <module-option name="password-stacking" value="useFirstPass"/>

                                            </login-module>

                                        </authentication>

                                    </security-domain>

                                    <security-domain name="jboss-web-policy" cache-type="default">

                                        <authorization>

                                            <policy-module code="Delegating" flag="required"/>

                                        </authorization>

                                    </security-domain>

                                    <security-domain name="jboss-ejb-policy" cache-type="default">

                                        <authorization>

                                            <policy-module code="Delegating" flag="required"/>

                                        </authorization>

                                    </security-domain>

                                </security-domains>-->

                     

                     

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:threads:1.1"/>

                            <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                                <core-environment>

                                    <process-id>

                                        <uuid/>

                                    </process-id>

                                </core-environment>

                                <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                                <coordinator-environment default-timeout="300"/>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="true">

                                <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                                <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

                                <virtual-server name="default-host" enable-welcome-root="true">

                                    <alias name="localhost"/>

                                    <alias name="example.com"/>

                                </virtual-server>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                                <modify-wsdl-address>true</modify-wsdl-address>

                                <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                                <endpoint-config name="Standard-Endpoint-Config"/>

                                <endpoint-config name="Recording-Endpoint-Config">

                                    <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                                        <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                                    </pre-handler-chain>

                                </endpoint-config>

                            </subsystem>

                            <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

                        </profile>

                     

                     

                        <interfaces>

                            <interface name="management">

                                <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

                            </interface>

                            <interface name="public">

                                <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                            </interface>

                            <interface name="unsecure">

                                <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

                            </interface>

                     

                     

                      <interface name="OceanView"> 

                                <inet-address value="${jboss.bind.address:192.168.0.118}"/>        <!-- Assuming you want to run oyur jgroup components in this address --> 

                            </interface> 

                     

                     

                        </interfaces>

                     

                     

                        <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                            <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

                            <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

                            <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

                            <socket-binding name="ajp" port="8009"/>

                            <socket-binding name="http" port="81"/>

                            <socket-binding name="https" port="8443"/>

                            <socket-binding name="jacorb" interface="unsecure" port="3528"/>

                            <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>

                            <socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>

                            <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>

                            <socket-binding name="jgroups-tcp" port="7600"/>

                            <socket-binding name="jgroups-tcp-fd" port="57600"/>

                            <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688" interface="OceanView" />

                            <socket-binding name="jgroups-udp-fd" port="54200" interface="OceanView"/>

                            <socket-binding name="messaging" port="5445"/>

                            <socket-binding name="messaging-throughput" port="5455"/>

                            <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

                            <socket-binding name="osgi-http" interface="management" port="8090"/>

                            <socket-binding name="remoting" port="4447"/>

                            <socket-binding name="txn-recovery-environment" port="4712"/>

                            <socket-binding name="txn-status-manager" port="4713"/>

                            <outbound-socket-binding name="mail-smtp">

                                <remote-destination host="localhost" port="25"/>

                            </outbound-socket-binding>

                        </socket-binding-group>

                     

                     

                    </server>

                    • 7. Re: Re: Re: Facing major issue in setting up security-domain configuration
                      jaysensharma

                      You have mistakenly added the "other" security-domain out side of the     <security-domains> </security-domains> tag, Move the other security-domain  tag inside the     <security-domains>  tag

                      • 8. Re: Re: Re: Facing major issue in setting up security-domain configuration
                        soranki

                        21:43:45,310 INFO  [org.jboss.web] (MSC service thread 1-8) JBAS018210: Registering web context: /OceanView

                         

                        21:43:54,776 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/OceanView'

                         

                        Really thanks for the above. I can see Registering web context: /OceanView. But as stated by you earlier the below error is something related to HornetQ. I really wanted to fix that as well. I have opened a new thread regarding that error but all my efforts went into vail. Please can u help on the below as well.

                         

                        For reference on HornetQ thread : Getting WARN message in logs with hornetq in Jboss   ( This is the thread I have created)

                         

                         

                        21:43:57,090 WARN  [org.hornetq.core.cluster.impl.DiscoveryGroupImpl] (hornetq-discovery-group-thread-dg-group1) There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=2b69ddee-66ec-11e3-a79c-5c260a4f8f17

                        • 9. Re: Re: Re: Facing major issue in setting up security-domain configuration
                          saurabh200

                          Hi,

                           

                          I am getting the below error while trying to do deployment for myWebApp. Any help on this will be really appreciated.

                           

                          22:12:56,032 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "myWebApp.war" (runtime-name: "myWebApp.war")
                          22:12:57,485 ERROR [org.jboss.as.server] (HttpManagementService-threads - 11) JBAS015870: Deploy of deployment "myWebApp.war" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./myWebApp.realm is missing [jboss.security.security-domain.myWebApp]"]}
                          22:12:57,579 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment myWebApp.war (runtime-name: myWebApp.war) in 93ms
                          22:12:57,610 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 11) JBAS014774: Service status report

                           

                          Thank you.