Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
I tried pulling the code into my environment, but all of the classes do not resolve. In lieu of trying this out myself, I'll ask if the following code:
to something like this as it looks to me like you are opening the connection and then setting your request property. I don't know if the lack of the property when the connection is opened may be leading to the exception or not which is occuring later in the code..
Joined: Feb 23, 2012
Hi Brian Burress.
Thank you for your reply.I don't create HttpsUrlConnection object directly because it is an abstract class.
Joined: Jun 30, 2003
My apologies, that's what I get for doing a quick read/reply
I have not done much with HTTPS (most of what I have been involved with is the setting the certificates on the server side). Hopefully someone with practical experience with HTTPS will see this and jump in.
In the meantime, have you looked at examples found from a google search? There are a number of examples that aren't exactly what you are doing but have some different properties (Example1) that are being set that you may want to look into to see how they are set up on your environment as well as dumping the certs and such to show you have a good connection (Example2):
As a side question, are you able to try making your connection using HTTP first to verify those mechanics work? If you are going through a proxy, I am wondering if you are trying to debug a proxy issue, an HTTPS issue or something else. Looking deeper at the stacktrace this site might be where you want to start as NTLMAuthentication is the class invoking the array copy: