【发布时间】:2011-04-14 01:21:44
【问题描述】:
嘿,我制作了一个 EJB 程序,并从我的 SQL 数据库中创建了实体类。一切正常,它可以连接到我的数据库,但由于某种原因我现在收到此错误。我使用 glassfish v3 和 netbeans ide 6.8
WARNING: Can not find resource bundle for this logger. class name that failed: com.sun.gjc.common.DataSourceObjectBuilder
SEVERE: jdbc.exc_cnfe_ds
java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
这里有更多随机错误。
WARNING: RAR5038:Unexpected exception while creating resource for pool mysql_carrent_rootPool. Exception : javax.resource.ResourceException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysql_carrent_rootPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource]
WARNING: Could not obtain connection metadata
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
我不明白为什么它不会找到类路径,即使它使我的实体来自数据库并且我的程序以前工作过。我可能没有对某些代码进行任何更改,但对类路径甚至数据库都没有更改。 感谢您的宝贵时间!
【问题讨论】:
标签: java mysql netbeans jakarta-ee ejb