The CreatorCon Call for Content is officially open! Get started here.

Issue with Remote file import after washington upgrade

Sangeetha Harin
Tera Contributor

Hi Everyone, 

 

We are using Remote file import to fetch the csv file from Mid-server and processing the record to update user table. It stopped working after washington upgrade. Getting the below error. 

var remoteFileImport = new CSMIDServerRemoteFileImport();

remoteFileImport.getRemoteFileAndUploadToInstance()

Root cause of JavaScriptException: java.lang.IllegalAccessException

 

Any lead will be really helpful. 

 

Thanks

1 ACCEPTED SOLUTION

napatil24
Tera Expert

Update the MID server Wrapper file with Below 2 line

 

in file ---  agent/conf/wrapper.conf file
---------------------- Below 2 line add --------------------------------------
wrapper.java.additional.201=--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED
wrapper.java.additional.202=--add-opens=java.base/sun.net.www.http=ALL-UNNAMED

View solution in original post

26 REPLIES 26

napatil24
Tera Expert

Update the MID server Wrapper file with Below 2 line

 

in file ---  agent/conf/wrapper.conf file
---------------------- Below 2 line add --------------------------------------
wrapper.java.additional.201=--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED
wrapper.java.additional.202=--add-opens=java.base/sun.net.www.http=ALL-UNNAMED

We had the same issue - added these lines to the bottom of the wrapper override file which resolved the issue.

Thank you for this! I just wanted to drop a comment to say that after adding those two lines to the wrapper-override.conf file and restarting the MID Server service, this is working as expected on Xanadu Patch 1 Hotfix 2a.

 

I've been watching the comments on the  Remote File Importer developer page, and glad to see this fix is as easy as you mentioned.

 

EDIT: As others have stated, please update the wrapper-override.conf file (I updated this in my original response). If you update the wrapper.conf file, it will work, but only until the next time the MID server is upgraded as wrapper.conf is overwritten. Also updated in my original response, we are on Xanadu Patch 1 Hotfix 2a, and everything is still working as expected.

davidpiper
ServiceNow Employee
ServiceNow Employee

NO! Don't ever edit wrapper.conf. It's the defaults, and that file gets replaced with every upgrade.  
You edit wrapper-override.conf instead.

KB0869393  Should MID Server wrapper.conf file be edited? (Spoiler: No)

 

Also, turning off java security defaults this isn't a good solution. You should be maintaining your code to be compatible with Java 17's defaults in the first place. All of servicenow's code is, and all code in apps compatible with Washington/Xanadu and later.