• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IllegalArgumentException when trying to connect to HTTPs based site.

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic