FileNet Intake error

Kizito igene
Tera Contributor

We are getting this ServiceNow error in our File Intake. Anyone have an idea what it is?

 

I checked the logs; I saw messages that imply it's a ServiceNow malfunction - Error Handling attachment: class org.mozilla.javascript.MemberBox cannot access class sun.net.www.protocol.https.HttpsURLConnectionImpl (in module java.base) because module java.base does not export sun.net.www.protocol.https to unnamed module @5b711a2a

1 REPLY 1

jamesmcwhinney
Giga Guru

We have run into this too via the below code:

 

 

this.log("Defining URL...");
var str_url = "https://blahblahblah.yattayattayata.com/Imreallytiredtoday";
var url = Packages.java.net.URL(str_url);
this.log("Opening Connection...");
var conn = url.openConnection();
this.log("Verifying Connection Type...");
if (conn instanceof Packages.java.net.HttpURLConnection) {
	this.log("Connection Type is correct");
} else {
	this.log("Connection Type is incorrect");
}

this.log("Connection opened.");
var userCredentials = new Packages.java.lang.String(this.username + ":" + this.password);
var basicAuth = "Basic " + Packages.java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
this.log("Done.");

 

 

 

This yields:

Trying Upload to Attachment Rest API
Defining URL...
Opening Connection...
Verifying Connection Type...
Connection Type is correct
Connection opened.
 
Error:
java.lang.IllegalAccessException: class org.mozilla.javascript.MemberBox cannot access class sun.net.www.protocol.https.HttpsURLConnectionImpl (in module java.base) because module java.base does not export sun.net.www.protocol.https to unnamed module @9651c58


Were you able to find a solution?