Results 1 to 10 of 10
- 07-12-2007, 02:31 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 3
- Rep Power
- 0
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:
this is the method that conatins the line above:Java Code:inputFromServlet = new ObjectInputStream(servletConnection.getInputStream());
here is the stack traceJava 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; }
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?Java 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)
Last edited by hardc0d3r; 07-12-2007 at 02:52 PM.
- 07-12-2007, 04:50 PM #2
Member
- Join Date
- Jul 2007
- Posts
- 44
- Rep Power
- 0
It's a bug I found this on internet
Bug ID: 4921144 java.io.IOException Server returned HTTP response code 500 for URL
- 07-12-2007, 05:50 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 3
- Rep Power
- 0
there is no workaround? is there any other way to pass a serialized string?
- 07-14-2007, 04:38 PM #4
Member
- Join Date
- Jul 2007
- Posts
- 36
- Rep Power
- 0
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.
- 07-18-2007, 02:43 PM #5
Member
- Join Date
- Jul 2007
- Posts
- 17
- Rep Power
- 0
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 ...
- 01-28-2010, 12:52 PM #6
Member
- Join Date
- Jan 2010
- Posts
- 1
- Rep Power
- 0
http 500 code
Make sure that your web service use the xmlrpc reference this error occurred when the client & server are belong to different platform.
- 01-28-2010, 01:47 PM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Who wrote the code MapEditor.java ?
There is a Nullpointer at line 703.
Either debug and fix or consult the documentation to see what conditions cause that line to throw the N.P.E.
- 09-30-2011, 06:46 PM #8
Member
- Join Date
- Feb 2011
- Posts
- 84
- Rep Power
- 0
Re: Server returned HTTP response code: 500.. i need help
Hi,
I am geting the same error ,can you tell me how you resolved it.
Thanks,
- 11-03-2011, 04:02 PM #9
Re: Server returned HTTP response code: 500.. i need help
What you have to do is implement the serializable interface in the class that will be sent.
implements Serializable
It worked for me!
- 03-12-2012, 08:08 PM #10
Similar Threads
-
java code for send sms through http
By for108 in forum Java ServletReplies: 11Last Post: 09-24-2009, 10:22 AM -
java.io.Exception: Server returned HTTP response code: 403
By navishkumarb in forum Advanced JavaReplies: 1Last Post: 01-05-2008, 01:33 PM -
response.sendRedirect(url)
By mutuah in forum Advanced JavaReplies: 2Last Post: 08-07-2007, 01:56 PM -
Velocity / XML response
By sabatier in forum XMLReplies: 0Last Post: 07-24-2007, 01:13 PM -
Server returned HTTP response code: 500
By Heather in forum Java ServletReplies: 1Last Post: 07-09-2007, 04:32 AM


LinkBack URL
About LinkBacks

Bookmarks