Uploaded image for project: 'SET - Setups'
  1. SET - Setups
  2. SET-138

In case of database error, the scheduler_install_tables.sh script returns, return code 0

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.12.4
    • 1.12.5
    • None

    Description

      Current Situation

      • When the user starts the ./scheduler_install_tables.sh and if reporting.hibernate.cfg.xml or hibernate.cfg.xml have wrong database connection cofiguration e.g. wrong username, password, database name etc.
      • The script will throw an hibernet error simiar to following error
        Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not connect: Access denied for user 'jobscheduler12x'@'localhost' (using password: YES)
        
      • Althought there is an error, the script return a success return code
        docker@osboxes:/opt/sos-berlin.com/jobscheduler$ cd jobscheduler_1.12.4-snapshot/install/
        docker@osboxes:/opt/sos-berlin.com/jobscheduler/jobscheduler_1.12.4-snapshot/install$ ./scheduler_install_tables.sh ; echo $?
        ...the JobScheduler database management system is mysql
        ...installing JobScheduler tables in SQL database which not exist
        Exception in thread "main" java.lang.Exception: connect to database failed: sos.connection.SOSMySQLConnection.connect(80): java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user 'jobscheduler12x'@'localhost' (using password: YES)
                at sos.connection.SOSConnectionFileProcessor.init(SOSConnectionFileProcessor.java:66)
                at sos.connection.SOSConnectionFileProcessor.<init>(SOSConnectionFileProcessor.java:47)
                at sos.connection.SOSConnectionFileProcessor.main(SOSConnectionFileProcessor.java:241)
        Caused by: java.lang.Exception: sos.connection.SOSMySQLConnection.connect(80): java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user 'jobscheduler12x'@'localhost' (using password: YES)
                at sos.connection.SOSMySQLConnection.connect(SOSMySQLConnection.java:80)
                at sos.connection.SOSConnectionFileProcessor.init(SOSConnectionFileProcessor.java:60)
                ... 2 more
        Caused by: java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user 'jobscheduler12x'@'localhost' (using password: YES)
                at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:121)
                at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
              ..
        	  ..
        	  ..	  
                at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:580)
                at org.mariadb.jdbc.Driver.connect(Driver.java:105)
                ... 4 more
        ...done
        0
        docker@osboxes:/opt/sos-berlin.com/jobscheduler/jobscheduler_1.12.4-snapshot/install$ 
        

      Desired Behavior

      • In case of hibernet error script should return a non zero return code, indicating an error.

      Attachments

        Activity

          People

            oh Oliver Haufe
            oh Oliver Haufe
            Santiago Aucejo Petzoldt Santiago Aucejo Petzoldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: