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

                      • How to change the database from MySQL/PostgreSQL to MSSQL

                        The steps mentioned below are applicable only if you migrate the DB from PgSQL to MSSQL. This means that the application server is going to remain the same. The data alone is going to be transferred to MSSQL DB from the existing PgSQL DB.    For ...
                      • 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 ...
                      • Failed to start the database

                        For the error "Failed to start the database", Check what database being used and, execute changeDBServer.bat. For Pgsql,  Start PGSQL from the command link, execute StartDB.bat 65432 under C:\Manageengine\ServiceDesk\bin 65432 is the default port ...
                      • MSSQL error 'Invalid Object name'

                        When you get a similar error as mentioned below  java.sql.BatchUpdateException: Invalid object name 'TABLE NAME' please change the COLLATION in the MSSQL server for the database 'servicedesk' as CASE-INSENSITIVE. You can get this error at the time of ...
                      • Inputs required for backup issues

                        Unable to take manual backup or schedule backup Backup is throwing an error Out of memory while taking backup Backup is slow.   Inputs required.   1. ...