Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

NTLM issue

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I have a piece of standalone java code which works fine on mywindows machine.
But when I run the same code on my server (Linux Box) it gives back an error HTTP 500 error.


Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://abcd.xlsx
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at java.net.HttpURLConnection.getResponseMessage(Unknown Source)
at TestNTLM.getAuthenticatedResponse(TestNTLM.java:50)
... 1 more




Does anyone have any idea how do I proceed ahead ?

Regards
 
Sheriff
Posts: 22118
114
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Error 500 is not related to login failures; those are 401 and 403. Error 500 is "Internal server error" which basically means the web page throws an error. Too bad the contents are no longer available in Java after the exception has been thrown; in VB I am able to retrieve the web page that displays the error.
 
amey mahadik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But if that is the case then it should give me back the same response on my windows desktop machine.
 
Marshal
Posts: 26473
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

amey mahadik wrote:But if that is the case then it should give me back the same response on my windows desktop machine.


I don't see why. There's any number of configuration options that could be different between the two machines. For example I see you're doing some kind of authentication in your code; perhaps that works differently from one machine to the next.
 
amey mahadik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have simply set the authenticator with the username and password so that it can be used by the networking code when the HTTP server or may be a proxy asks for authentication.

I am not sure if there are any configurations required for this.
 
I don't always make ads but when I do they're tiny
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic