服务器返回的HTTP响应代码:URL的500 [英] Server returned HTTP response code: 500 for URL

查看:566
本文介绍了服务器返回的HTTP响应代码:URL的500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

java.io.IOException: Server returned HTTP response code: 500 for URL: http://ww
.huadt.com.cn/zh-cn/i/l/@357671030745308@V500@0000@AUTOLOW@1@11d590f7$GPRMC,065
48.000,A,3959.8587,N,11617.2447,E,0.00,55.32,210311,,,A*56@@
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown S
urce)
        at hdt.SendCmdToP.Sendplatform(SendCmdToP.java:67)
        at hdt.SendCmdToP.process(SendCmdToP.java:198)
        at hdt.SendCmdToP.run(SendCmdToP.java:131)
java.lang.NullPointerException
        at hdt.SendCmdToP.Sendplatform(SendCmdToP.java:91)
        at hdt.SendCmdToP.process(SendCmdToP.java:198)
        at hdt.SendCmdToP.run(SendCmdToP.java:131)

出现指针,并且与500错误的关闭异常有关,与防火墙有关系吗?如果不是,那是代码问题吗?请帮助大家看看如何解决问题. 谢谢.

Appeared pointer, and 500 wrong with the closure of the abnormal, a firewall relationship? If not is it code problems? Please help everybody see how to solve the problem. thanks。

推荐答案

500响应表示服务器已检测到内部错误.可能有很多原因.

A 500 response means that the server has detected an internal error. There could be any number of causes.

查找有关导致错误的信息的最佳位置是服务器日志.否则,URLConnection对象的错误"流中可能会包含一些其他诊断信息.尝试打开该文件并将其内容复制到标准输出或记录器中.

The best place to look for information on what caused the error is the server logs. But failing that, there maybe some additional diagnostic information in the URLConnection object's "error" stream. Try opening that and copying its contents to standard output, or a logger.

或者只是在Web浏览器中访问URL或使用wget或curl,然后查看显示给您的错误消息.

Or just visit the URL in your web browser or using wget or curl, and look at the error message it shows you.

(您必须谨慎使用其他工具,因为可以想象到问题是由HTTP请求标头中的某些内容引起的,而这些问题可能取决于您用来获取URL的工具. )

(You have to be cautious with using other tools, because it is conceivable that the problem is caused by something in the HTTP request headers ... and these are likely to depend on the tool that you use to fetch the URL.)

这篇关于服务器返回的HTTP响应代码:URL的500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆