Error-Cannot invoke "java.util.Map.keySet()" because "this.fImportSourceFields" is null

midhunkrish
Tera Contributor

As we are trying to fetch the data from SQL server via JDBC using mid server. i am facing the following error when trying to make test load 20 records.

 

can someone help me on the following issue...

midhunkrish_0-1743782402733.png

 

2 REPLIES 2

Shivalika
Mega Sage

Hello @midhunkrish 

 

You have below 👇 solutions - 

 

1)Update the JDBC Driver, give the password again. This fixed issue for us. 

https://learn.microsoft.com/en-us/sql/connect/jdbc/system-requirements-for-the-jdbc-driver?view=sql-...

 

2)Set Integrated authentication on Data source - Create a domain user which have access to sql data base, while creating the mid server user the same as service account. In data source click on integrated authentication check box. It will solve the issues. 

 

3)SQL error due to a table used in the SQL query not available for my SCCM user. Usually, these errors are visible in the ServiceNow console and in the progress worker but here strangely, it was not visible.   

Fixing the SQL query fixed the issue for me.

 

4)Missing rule in the firewall from the MID server to the database.

 

5)Updating the script with the DBA team, and the pemissions of the account used for connection were also redone. 

 

6)Mid server rekey

 

There are several other solutions - anyone may work for you. 

 

Just go through below thread after my solutions and maybe you will find one solution. 

 

https://www.servicenow.com/community/itom-forum/error-cannot-invoke-quot-java-util-map-keyset-quot-b...

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

 

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@midhunkrish 

it seems you are trying to load data for SCCM

check these links which talks about the same error and see if any of those comments help you

Error 'Cannot invoke "java.util.Map.keySet()" because "this.fImportSourceFields" is null' in SN 

Need help on JDBC Type connection with Oracle Database using Datasources 

SCCM connection issue 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader