Mssql Schedule backup failed due to StringIndexOutOfBoundsException

Mssql Schedule backup failed due to StringIndexOutOfBoundsException

Mssql Schedule backup failed due to StringIndexOutOfBoundsException. This issue is already fixed in 13002.

Trace:
[08:30:00:504]|[01-05-2023]|[com.adventnet.db.adapter.Jdbc20DBAdapter]|[INFO]|[211]: splitConnectionURL :: {charset=utf-8, Tds=8.0, Server=SCASQLCLU, Port=1433, DatabaseName=servicedesk_2019, urlWithoutProps=jdbc:sqlserver://SCASQLCLU:1433, jdbcurl_props_separator=;, url_props_delimiter=;, socketTimeout=1200000, XaEmulation=false, urlProps={Tds=8.0, XaEmulation=false, PrepareSql=3, DatabaseName=servicedesk_2019, loginTimeout=5, socketTimeout=1200000, charset=utf-8}, DBName=servicedesk_2019, loginTimeout=5, properties={charset=utf-8, DatabaseName=servicedesk_2019, DBName=servicedesk_2019, socketTimeout=1200000, PrepareSql=3, XaEmulation=false, Tds=8.0, Port=1433, Server=SCASQLCLU, loginTimeout=5}, PrepareSql=3}|
[08:30:00:520]|[01-05-2023]|[SYSERR]|[INFO]|[211]: java.lang.StringIndexOutOfBoundsException: String index out of range: -1|
[08:30:00:520]|[01-05-2023]|[SYSERR]|[INFO]|[211]: 	at java.lang.String.substring(String.java:1927)|
[08:30:00:520]|[01-05-2023]|[SYSERR]|[INFO]|[211]: 	at com.adventnet.servicedesk.tools.ConnectionUtil.getDBName(ConnectionUtil.java:414)|
[08:30:00:520]|[01-05-2023]|[SYSERR]|[INFO]|[211]: 	at com.manageengine.servicedesk.tools.BackUp.scheduledBackup(BackUp.java:719)|
[08:30:00:520]|[01-05-2023]|[SYSERR]|[INFO]|[211]: 	at com.adventnet.servicedesk.setup.task.ScheduledBackupTask.executeTask(ScheduledBackupTask.java:88)|

Solution:
The issue is due to "DatabaseName" key in database_params.conf in param url. Kindly change the "DatabaseName" in  database_params.conf present inside <Servicedesk-Home>/conf directory to "databaseName" and try invoking backup.

                  New to ADSelfService Plus?

                    • Related Articles

                    • SQL Backup permission post 10.6 Upgrade.

                      Error on the logs: [20:00:50:193]|[04-25-2022]|[com.adventnet.taskengine.backup.DbBackupTask]|[INFO]|[124]: BackupStatus updated in DB :: <BackupStatus backup_id=1806 backupType="FULL_BACKUP" ...
                    • Backup & Restore (from 14000) - Behavior changes

                      Backup: POSTGRES & MSSQL: -> When taking a backup using the command backUpData.bat/backUpData.sh the backup will be created in the EZIP format. This is the native model of PGSQL / SQL. -> When taking a backup using the command ...
                    • Alternative for Full Backup - Trimmed backup

                      Applicable till 8.1 version (Till 8121 builds) Nowadays the database size is huge in various users instance. It is because the indexing related files, archived files, file attachments are folder are huge in size. Due to which either our application ...
                    • Scheduled Backup failure due to permission issue in pgsql folder

                      Error Traces: [com.adventnet.db.adapter.BackupRestoreUtil]|[WARNING]|[250]: pg_basebackup: could not get write-ahead log end position from server: ERROR: could not open file "./pg_hba.conf_3may23.bkp": Permission denied| ...
                    • Backup failed due to FileNotFound Exception

                      Backup failed due to the presence of 0KB files or Problematic files Steps to follow 1. Please download the fjar attached. 2. Extract the 1_<buildnumber>.jar from the fjar 3.Place the extracted jar in <servicedesk-home>/lib 4.If scheduled backup, need ...