Mysql Jelastic Glassfish连接池-上下文
我的问题只发生在Jelast云服务器节点上,而不是本地计算机上 我做了以下工作:Mysql Jelastic Glassfish连接池-上下文,mysql,jakarta-ee,glassfish,connection-pooling,Mysql,Jakarta Ee,Glassfish,Connection Pooling,我的问题只发生在Jelast云服务器节点上,而不是本地计算机上 我做了以下工作: 我已经将mysql jar驱动程序上传到glassfish的lib文件夹中 我已创建连接池,ping已成功 我创建了数据源 但当我运行以下JSP时: <%@page import="java.io.Writer"%> <%@page import="javax.sql.DataSource"%> <%@page import="java.sql.Connection"%> &
- 我已经将mysql jar驱动程序上传到glassfish的
文件夹中lib
- 我已创建连接池,ping已成功
- 我创建了数据源
<%@page import="java.io.Writer"%>
<%@page import="javax.sql.DataSource"%>
<%@page import="java.sql.Connection"%>
<%@page import="javax.naming.InitialContext"%>
<%@page import="javax.naming.Context"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<%
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/rook-server");
Connection conn = ds.getConnection();
%>
</body>
</html>
我来自Jelast团队。我们现在正在分析这个问题。我们找到原因后会通知你的。尝试重新启动GlassFish,也许这会有所帮助。 当做
玛丽娜我的Jelast试用账户也有同样的问题。不知怎的,几天后他们/我就开始工作了。不知道原因是什么,很可能是服务器配置问题——用户无法控制的问题。Jelast支持论坛也有一些关于这个主题的帖子。如果你试着在那里问你的问题,也许你会得到更多的帮助(尽管有时这里会有一个Jelast支持团队成员)。分析的结果是什么?
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: 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
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.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
root cause
com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
root cause
com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
root cause
com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
root cause
javax.resource.ResourceException: 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 3.1.1 logs.
GlassFish Server Open Source Edition 3.1.1