rhysbrennan
Tera Expert

Hey all I'm just adding some additional information to an existing KB for the error.

I have been facing a issue where I get the MID Server reported error: Failed to init the JDBC connection. Check configuration error when running a JDBC connection from a data source. The error only occurs in scoped applications.

The issue occurred in dev and the support team fixed the problem but didn't realise it. Their accidental fix was to provide the mid server admin access to the instance and then restart the mid server. 

The issue was that the mid server did not have access to read the sys_data_source table and a none * (so change the mode to table) ACL was required in the scoped app, on the sys_data_source table. Reboot the MID server after the change.

 

This is the same result as described in the KB from SN except it has more detail to the second option. The first option is not available external or purchased scoped apps like Human Resources Core. https://hi.service-now.com/kb_view.do?sysparm_article=KB0744351

"Deactivate 'Application administration' on the sys_scope record.
OR
If 'Application administration' is required to be Active. We will need to ensure that the READ ACLs against the 'sys_data_source' table has the role defined - 'x_<scope_name>.user' i.e. whatever is configured on the Application details so that the mid server user can access the sys_data_source table."

Comments
Darren Lau
Kilo Sage

I'm running into this same issue on our Paris instance.  I have a JDBC data source I created in a paid-for scoped app.  I want to import data from an Oracle instance to an import set table that I want in the scoped app and eventually use a script to process the data in the import set table and insert it into another table within the app.  Can you expand in more detail on what was the solution for this issue?  The following description is a bit vague.  Thanks for the help.

 

"Their accidental fix was to provide the mid server admin access to the instance and then restart the mid server. 

The issue was that the mid server did not have access to read the sys_data_source table and a none * (so change the mode to table) ACL was required in the scoped app, on the sys_data_source table. Reboot the MID server after the change."

Dhirendra Singh
Mega Sage

The Solution is very simple - 

Impersonate your mid server user

Try to reload and see your data source - you cant see it - coz its in scoped application.

Try to see your import set table - you cant see it or load it - coz its in scoped application.

Above both appear coz you have not given required role to your mid server as well as read ACL to data source -

Now

1) Go to your import set table - see the role required to read it.

2) Assign same role to your mid server user.

3) Remaining in your current scope of scoped application, create new read ACL on sys_data_source for read access table level (with none) give it the same role you have in ur import set table.

After above steps done.

Re-impersonate your mid server user - Navigate to data source - you must see the data source.

Navigate to your import set table - you must see it.

- if yes - for above both move forward - else repeat points above.

Finally - 

if all good now - Restart your mid server so that it can acquire the new role given to it.

Test the JDBC data source - it will work.

I have done multiple implementations of same, answer is as per own understanding developed logically while troubleshooting the issues around it. Plz mark the answer correct if it has helped.

 

 

 

Harshitha SR1
Tera Contributor

Hi Dhiren,

Tried the above steps but we are getting new error added the screenshot so please advise us on this.

find_real_file.png

Thanks & Regards,

Harshitha SR

 

Dhirendra Singh
Mega Sage

@Harshitha SR1  Although late in responding, however this is connection error as per error description itself. Hence start from top-down establishing connection. The error looks related to end point. Either your end point is incorrect or authentication is not working. Try establishing connection first, for testing you can use postman if end point/auth is working and re-try.

Version history
Last update:
‎11-25-2019 04:26 PM
Updated by: