Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4257

Jboss fails to start with MySQL due to case sensitive issue

XMLWordPrintable

    • Low
    • Workaround Exists
    • Hide

      UGLY: One would have to manually create a table "TIMERS" in upper case each deployment of the database!

      Show
      UGLY: One would have to manually create a table "TIMERS" in upper case each deployment of the database!

      Hi,

      Here is a case whereby the HARDCODED table name in org.jboss.ejb.txttimer GeneralPurposeDatabasePersistencePlugin is causing a problem.

      Facts:
      ---------
      1) MySQL is case SENSITIVE for database and table names under any OS, except Windows!
      2) Since MySQL 4.0, all tables are created in lowercase regardless of the script
      3) GeneralPurposeDatabasePersistencePlugin hardcodes the table TIMERS to be upper case.

      Environment:
      --------------------
      1) Development happens under windows, hence all tables are in lower case 'timers'
      2) Deployment will be on UNIX
      3) the deployment database is created from a MySQL BACKUP of a development/test environment which is under Windows.
      4) For extra security, Jboss will run with a datasource that CANNOT create a table

      Issue:
      ---------

      • the backup will contain only lowercase tables
      • JBoss will try to see if table TIMERS exists but because of the case, will not find it
      • JBoss then tries to create it, but will not be able to do so!

      Resolution:
      ----------------

      • In order to be truly portable, all scripts should use lower case for tables/databases.
      • Ideally externalise the creation but otherwise, just use "timers" in lowercase
      • Similar issue exist in the jms jboss-service.xml with JMS_MESSAGES etc. I would suggest changing the scripts to be in lower case.

      Thanks

            dandread1@redhat.com Dimitrios Andreadis
            benoitx_jira Benoit Xhenseval (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: