Java GlassFish Http 状态 500 - 内部服务器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28151234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 05:41:35  来源:igfitidea点击:

GlassFish Http Status 500 - Internal Server Error

javapostgresqljspglassfishcrud

提问by rflpazini

When I try to run my Web Application (a basic CRUD) using JSP, the GlassFish server returns the follow message:

当我尝试使用 JSP 运行我的 Web 应用程序(一个基本的 CRUD)时,GlassFish 服务器返回以下消息:

HTTP Status 500 - Internal Server Error

HTTP 状态 500 - 内部服务器错误

typeException report

输入异常报告

messageInternal Server Error

消息内部服务器错误

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

说明服务器遇到内部错误,无法完成此请求。

exception

例外

java.lang.NullPointerException

java.lang.NullPointerException

noteThe full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1 logs.

注意异常的完整堆栈跟踪及其根本原因可在 GlassFish Server Open Source Edition 4.1 日志中找到。

And I don't knhow what to do. I think the error is in connection with my DB. I'm using PostgreSQL, running in a Windows.

我不知道该怎么办。我认为该错误与我的数据库有关。我正在使用 PostgreSQL,在 Windows 中运行。

My NetBeans project is in GitHub Crisfa Project

我的 NetBeans 项目在 GitHub Crisfa 项目中

采纳答案by Mike

An HTTP 500 error is meaningless. It is only telling you that something went wrong, although you can see that whatever it was was down to a null pointer error. You need to look in the server logs to see what caused the null pointer error.

HTTP 500 错误毫无意义。它只是告诉你出了什么问题,尽管你可以看到它归结为空指针错误。您需要查看服务器日志以查看导致空指针错误的原因。

This StackOverflow question has a few good answers on how to find the server logs, either manually through the file system, or with NetBeans. Location of GlassFish Server Logs

这个 StackOverflow 问题对如何通过文件系统手动或使用 NetBeans 查找服务器日志提供了一些很好的答案。GlassFish Server 日志的位置