Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19167

[GSS](7.3.z) Placeholder ##DEFAULT_DATASOURCE## is not replaced during the container startup process

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.3.1.GA
    • None
    • OpenShift
    • None
    • Hide

      Workaround A:
      Don't bring 7.1 or 7.2 based standalone-openshift.xml into the EAP7.3 container. Re-create standalone-openshift.xml if the user tries to update minor version like from EAP7.2 to 7.3.

      Workaround B:
      Set the JNDI name of default data source instead of ##DEFAULT_DATASOURCE## as below

      $ diff -u standalone-openshift.xml.org standalone-openshift.xml
      --- standalone-openshift.xml.org	2020-04-03 18:43:02.858023583 +0900
      +++ standalone-openshift.xml	2020-04-03 18:43:35.903730751 +0900
      @@ -172,7 +172,7 @@
                       </managed-scheduled-executor-services>
                   </concurrent>
                   <default-bindings context-service="java:jboss/ee/concurrency/context/default"
      -                              datasource="##DEFAULT_DATASOURCE##"
      +                              datasource="java:jboss/datasources/ExampleDS"
                                     jms-connection-factory="##DEFAULT_JMS##"
                                     managed-executor-service="java:jboss/ee/concurrency/executor/default"
                                     managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default"
      
      Show
      Workaround A: Don't bring 7.1 or 7.2 based standalone-openshift.xml into the EAP7.3 container. Re-create standalone-openshift.xml if the user tries to update minor version like from EAP7.2 to 7.3. Workaround B: Set the JNDI name of default data source instead of ##DEFAULT_DATASOURCE## as below $ diff -u standalone-openshift.xml.org standalone-openshift.xml --- standalone-openshift.xml.org 2020-04-03 18:43:02.858023583 +0900 +++ standalone-openshift.xml 2020-04-03 18:43:35.903730751 +0900 @@ -172,7 +172,7 @@ </managed-scheduled-executor-services> </concurrent> < default -bindings context-service= "java:jboss/ee/concurrency/context/ default " - datasource= "##DEFAULT_DATASOURCE##" + datasource= "java:jboss/datasources/ExampleDS" jms-connection-factory= "##DEFAULT_JMS##" managed-executor-service= "java:jboss/ee/concurrency/executor/ default " managed-scheduled-executor-service= "java:jboss/ee/concurrency/scheduler/ default "
    • Hide

      Deploy the attached reproduction code echo-src-repo.zip with the below command

      oc new-app --template eap73-basic-s2i -p APPLICATION_NAME=echo -p SOURCE_REPOSITORY_URL=<git-repo-url-for-echo-application>  -p ENABLE_GENERATE_DEFAULT_DATASOURCE=true
      

      The standalone-openshift.xml in echo-src-repo.zip is only changed the following diff from the default, to launch EAP7.3 container successfully:

      --- standalone-openshift.xml.eap72	2020-04-03 18:23:05.853625994 +0900
      +++ standalone-openshift.xml	2020-04-03 18:22:59.066685293 +0900
      @@ -147,12 +147,6 @@
                           <driver name="h2" module="com.h2database.h2">
                               <xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource</xa-datasource-class&gt;
                           </driver>
      -                    <driver name="mysql" module="com.mysql">
      -                        <xa-datasource-class&gt;com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class&gt;
      -                    </driver>
      -                    <driver name="postgresql" module="org.postgresql">
      -                        <xa-datasource-class&gt;org.postgresql.xa.PGXADataSource</xa-datasource-class&gt;
      -                    </driver>
                           <!-- ##DRIVERS## -->
                       </drivers>
                   </datasources>
      
      Show
      Deploy the attached reproduction code echo-src-repo.zip with the below command oc new -app --template eap73-basic-s2i -p APPLICATION_NAME=echo -p SOURCE_REPOSITORY_URL=<git-repo-url- for -echo-application> -p ENABLE_GENERATE_DEFAULT_DATASOURCE= true The standalone-openshift.xml in echo-src-repo.zip is only changed the following diff from the default, to launch EAP7.3 container successfully: --- standalone-openshift.xml.eap72 2020-04-03 18:23:05.853625994 +0900 +++ standalone-openshift.xml 2020-04-03 18:22:59.066685293 +0900 @@ -147,12 +147,6 @@ <driver name= "h2" module= "com.h2database.h2" > <xa-datasource- class& gt;org.h2.jdbcx.JdbcDataSource</xa-datasource- class& gt; </driver> - <driver name= "mysql" module= "com.mysql" > - <xa-datasource- class& gt;com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource- class& gt; - </driver> - <driver name= "postgresql" module= "org.postgresql" > - <xa-datasource- class& gt;org.postgresql.xa.PGXADataSource</xa-datasource- class& gt; - </driver> <!-- ##DRIVERS## --> </drivers> </datasources>

    Description

      If standalone-openshift.xml is brought from jboss-eap-7/eap71-openshift or jboss-eap-7/eap72-openshift to jboss-eap-7/eap73-openjdk8-openshift-rhel7, and even if the environment variable ENABLE_GENERATE_DEFAULT_DATASOURCE=true is set, then the following error occurs when starting the EAP7.3 container:

      WARN You have set environment variables to configure the datasource in the default-bindings in the ee subsystem subsystem which conflicts with the value that already exists in the base configuration. The base configuration value will be used. Fix your configuration.
      ...
      04:08:33,987 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "echo.war")]) - failure description: {
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.echo.echo.env.##DEFAULT_DATASOURCE##"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.echo.echo.DefaultDataSource is missing [jboss.naming.context.java.module.echo.echo.env.##DEFAULT_DATASOURCE##]"]
      }
      

      In this error occurs, the place holder ##DEFAULT_DATASOURCE## is not replaced during starting up container.

      <default-bindings context-service="java:jboss/ee/concurrency/context/default"
                        datasource="##DEFAULT_DATASOURCE##" <<<===
                        jms-connection-factory="java:jboss/DefaultJMSConnectionFactory"
                        managed-executor-service="java:jboss/ee/concurrency/executor/default"
                        managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default"
                        managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
      

      Attachments

        Issue Links

          Activity

            People

              yborgess1@redhat.com Yeray Borges Santana
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: