且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Windows中的Netbeans / Glassfish上添加jdbc驱动程序的位置?

更新时间:2021-11-22 04:19:35

将jar文件放在$ glassfish-v3-install-root / glassfish / lib中证明是正确的。

Putting the jar file in $glassfish-v3-install-root/glassfish/lib turned out to be correct.

"SEVERE: RAR5111 : Error casting to javax.sql.Datasource java.lang.ClassCastException: com.mysql.jdbc.Driver cannot be cast to javax.sql.DataSource"


$ b我认为,$ b

错误是由于glassfish服务器上的jdbc池设置不正确造成的。但是转到管理控制台,可从Netbeans服务器选项卡获取,转到JDBC,连接池,选择java.sql.driver作为资源类型和com.mysql.jdbc.driver因为驱动程序类名将摆脱铸造问题。

error was, I believe, caused by an incorrect setting for the jdbc pooling on the glassfish server. But going to the admin console, available from the Netbeans "server" tab, going to the "JDBC", "Connection Pools", select "java.sql.driver" as the resource type and "com.mysql.jdbc.driver" as the driver classname will get rid of the casting issue.

单击顶部附近的Ping按钮以确保连接。

Click the "Ping" button near the top to make sure you're connecting.