Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-12-2007, 03:31 PM
Member
 
Join Date: Jul 2007
Posts: 3
hardc0d3r is on a distinguished road
Server returned HTTP response code: 500.. i need help
i have this applet that communicates with a servlet.. when the applet connects to the servlet, i get the Server returned HTTP response code: 500 error.. when i am testing in my own pc, everything is fine.. when i tried deploying it in a server, the error occurs.. i do not have any idea what is wrong..

i get the error in this line in my applet:
Code:
inputFromServlet = new ObjectInputStream(servletConnection.getInputStream());
this is the method that conatins the line above:

Code:
protected String myMethod(String fileName) { String doc = null; ObjectInputStream inputFromServlet = null; try { URL loadMapServlet = new URL(this.getCodeBase(), "loadMap?action=load&fileName=" + this.getCodeBase().toString() + fileName); URLConnection servletConnection = loadMapServlet.openConnection(); inputFromServlet = new ObjectInputStream(servletConnection.getInputStream()); doc = (String)inputFromServlet.readObject(); inputFromServlet.close(); } catch (Exception e) { e.printStackTrace(); } return doc; }
here is the stack trace

Code:
java.io.IOException: Server returned HTTP response code: 500 for URL: http://mental_boi.s46.eatj.com/CityNavigator/loadMap?action=load&fileName=http://mental_boi.s46.eatj.com/CityNavigator/mapSpain.svg at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at edu.citynavigator.map.editor.MapEditor.loadMap(MapEditor.java:685) at edu.citynavigator.map.editor.MapEditor.init(MapEditor.java:130) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) java.lang.NullPointerException at java.io.StringReader.<init>(Unknown Source) at edu.citynavigator.map.editor.MapEditor.stringToSVG(MapEditor.java:703) at edu.citynavigator.map.editor.MapEditor.init(MapEditor.java:131) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
another question.. is it required to sign the applet when doing an applet servlet communication? if yes, is there a free, easy way of doing this?

Last edited by hardc0d3r : 07-12-2007 at 03:52 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007, 05:50 PM
Member
 
Join Date: Jul 2007
Posts: 44
simon is on a distinguished road
It's a bug I found this on internet
Bug ID: 4921144 java.io.IOException Server returned HTTP response code 500 for URL
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-12-2007, 06:50 PM
Member
 
Join Date: Jul 2007
Posts: 3
hardc0d3r is on a distinguished road
there is no workaround? is there any other way to pass a serialized string?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-14-2007, 05:38 PM
Member
 
Join Date: Jul 2007
Posts: 36
boy22 is on a distinguished road
if you use IE go to
Tools-- Internet options -- Advanced -- Show Friendly HTTP messages checkbox is unchecked. If the checkbox is checked, IE shows generic error page instead of actual error page returned by server.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-18-2007, 03:43 PM
Member
 
Join Date: Jul 2007
Posts: 17
sathish_2111 is on a distinguished road
Error code 500 means - Internal server error....

I think your server has some problem. Make sure the URL to which you are accessing is running properly in the server ...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java code for send sms through http for108 Java Servlet 2 04-02-2008 01:00 PM
java.io.Exception: Server returned HTTP response code: 403 navishkumarb Advanced Java 1 01-05-2008 02:33 PM
response.sendRedirect(url) mutuah Advanced Java 2 08-07-2007 02:56 PM
Velocity / XML response sabatier XML 0 07-24-2007 02:13 PM
Server returned HTTP response code: 500 Heather Java Servlet 1 07-09-2007 05:32 AM


All times are GMT +3. The time now is 10:31 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org