1 Reply Latest reply on Jan 13, 2012 5:42 AM by Valerio Spadaro

    System Property is not resolved in standalone.xml

    Alvar Hanso Newbie

      I am setting a system property in standalone.xml:


      <property name="security.login.module" value="ch.abraxas.base.jboss.LDAPLoginModule"/>


      I try to use it like this:

      <login-module code="${security.login.module}" flag="required">


      But when I log into the application I get this error:


      ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http-- Login failure: javax.security.auth.login.LoginException: Die Anmeldemodulklasse kann nicht gefunden werden: ${security.login.module} from [Module "deployment.base-test-ear.ear.base-csm-impl-web-1.0.1-SNAPSHOT.war:main" from Service Module Loader]


      It seems that the system property is not resolved. But in the JBoss web administration console I can see this system property and its value.


      As it seams, JBoss AS 7 treats it not as a boot time property according to the schema file jboss-as-config_1_0.xsd for the <server> node. But I want to use it in the stanalone mode and then I think I can only be in the <server> node.


      I now tried it with domain mode, so that the system properties are boot time properties. It did not change anything with the problem.


      What is wrong?

        • 1. Re: System Property is not resolved in standalone.xml
          Valerio Spadaro Newbie

          I am migrating my application from jboss 6 to 7 and I would to use some custom system properties in the standalone.xml for logging and datasource configuration but jboss doesn't resolve them.

          I think that Jboss resolves system properties only in some sections of standalone.xml (for example it resolves ${jboss.binding.address} or {jboss.socket.binding.port-offset} in socket and webservice sections).


          I have the same problem in JPA persistence.xml inside a jar: i would to point to a different orm file so i can use my application with different dbms (oracle or mysql). In jboss 6 i used this:




          but jboss 7 doesnt resolve db.type.


          However jboss 7 can resolve the following tag in the same file:


          <property name="hibernate.dialect"   value="${db.dialect}" />