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

Configuration of statement tracking fails, according to XSD

XMLWordPrintable

    • Hide

      Add

      <statement>
      <track-statements>true</track-statements>
      </statement>

      within a <datasource> element to standalone-full.xml.

      Show
      Add <statement> <track-statements>true</track-statements> </statement> within a <datasource> element to standalone-full.xml.

      The configuration for checking for (un)closed statements using

      <statement>
      <track-statements>true</track-statements>
      </statement>

      within a <datasource> element results in an IAE:

      java.lang.IllegalArgumentException: No enum const class org.jboss.jca.common.api.metadata.ds.Statement$TrackStatementsEnum.true
      at java.lang.Enum.valueOf(Enum.java:196) [rt.jar:1.6.0_11]
      at org.jboss.jca.common.api.metadata.ds.Statement$TrackStatementsEnum.valueOf(Statement.java:47) [ironjacamar-common-api-1.0.7.Final.jar:1.0.7.Final]
      at org.jboss.as.connector.subsystems.datasources.DataSourceModelNodeUtil.from(DataSourceModelNodeUtil.java:159) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.connector.subsystems.datasources.DataSourceEnable.addServices(DataSourceEnable.java:153) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.connector.subsystems.datasources.DataSourceEnable$1.execute(DataSourceEnable.java:90) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.connector.subsystems.datasources.DataSourceEnable$1.execute(DataSourceEnable.java:92) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:311) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_11]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_11]
      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_11]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

      According to jboss-as-datasource_1_0.xsd the values

      • false
      • true
      • nowarn

      are valid.

      However, in the enum Statement$TrackStatementsEnum all values exist capitalized (FALSE, TRUE, NOWARN).

      Proposed workaround: Configure statement tracking with capitalized values. E.g.:

      <statement>
      <track-statements>TRUE</track-statements>
      </statement>

              smaestri@redhat.com Stefano Maestri
              bhelfert_jira Bastian Helfert (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: