簡體   English   中英

GlassFish HTTP 狀態 500 - 內部服務器錯誤 (JSTL)

[英]GlassFish HTTP Status 500 - Internal Server Error(JSTL)

當我嘗試使用 JSP 運行我的 Web 應用程序時,GlassFish 服務器返回以下消息:

HTTP Status 500 - Internal Server Error
type Exception report

messageInternal Server Error

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

exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 5.1.0 logs.

GlassFish Server Open Source Edition 5.1.0

我不知道該怎么辦。 我認為錯誤與Can't find javax.servlet.jsp.jstl.jar library in glassfish server 有關

所以我想通了,我所要做的就是將數據源類名設置為

com.mysql.cj.jdbc.MysqlDataSource

因為我使用的是 MySql 連接器 J 版本 8。

最初我將數據源類名設置為

com.mysql.jdbc.jdbc2.optional.MySqlDataSource

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM