IllegalArgumentException when trying to connect to HTTPs based site.
Joined: Oct 13, 2007
I'm trying to connect to a HTTPs based site using JAVA program with username and password provided to me but it gives me the following error.
I have this below before I open the connection to data source
and this is my 'Authenticator' class.
Could someone please advice what might be the cause of this? Thanks in advance for all the help.
Joined: Apr 20, 2008
That's hard to say for sure "yup, you need another String there" because you don't have access to the server-side implementation. Since you said the username/password were provided to you, I'm guessing your code simply doesn't match what the server expects, OR you're getting a return value your code isn't designed to handle.
From the Java API, that exception is "Thrown to indicate that a method has been passed an illegal or inappropriate argument. "
If this is someone else's server, I would definitely contact them first to ask how authentication works.