Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4303

domain/host.xml cannot be parsed when a <variable> is defined under <jvm><environment-variables>

XMLWordPrintable

    • Hide

      just add

      <environment-variables>
          <variable name="foo" value="bar"/>
      </environment-variables>
      

      to a jvm configuration (level does not matter, same for server-group, host or server level)

      Show
      just add <environment-variables> <variable name= "foo" value= "bar" /> </environment-variables> to a jvm configuration (level does not matter, same for server-group, host or server level)

      Executing following dmr operation is successful:

      {
          "operation" => "add",
          "address" => [
              ("host" => "master"),
              ("server-config" => "server-1"),
              ("jvm" => "default")
          ]
          "java-home" => "C:/eplatform/java/jdk1.7.0",
          "heap-size" => "128m",
          "max-heap-size" => "256m",
          "permgen-size" => "64m",
          "max-permgen-size" => "128m",
          "stack-size" => "512k",
          "environment-variables" => [{"foo" => "bar"}]
      }
      

      and results in following xml:

      <jvm name="default" java-home="C:/eplatform/java/jdk1.7.0">
          <heap size="128m" max-size="256m"/>
          <permgen size="64m" max-size="128m"/>
          <stack size="512k"/>
          <environment-variables>
              <variable name="foo" value="bar"/>
          </environment-variables>
      </jvm>
      

      but the server (domain mode) cannot be (re)started anymore and results in following exception:

      [Host Controller] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[51,21]
      [Host Controller] Message: JBAS014789: Unexpected element '{urn:jboss:domain:1.2}variable' encountered
      

              kkhan1@redhat.com Kabir Khan
              michael.voegele@cloudops Michael Voegele (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: