2

我按照本教程中的说明进行操作。我的步骤有问题:测试连接池和数据源。但是,一遍又一遍地执行这些步骤,我仍然遇到异常:表/视图“类别”不存在。当我在“服务”下检查时,表存在。

我指定的 JDBC 连接 URL 是:jdbc:mysql://localhost:3306/affablebean?zeroDateTimeBehavior=convertToNull

Netbeans 7.3.1 MySQL 服务器 5.6 Glassfish 服务器 4

4

1 回答 1

5

There is an error in the tutorial at Step 3 of "Creating a Resource Reference to the Data Source".

You can fix this by changing this line in your web.xml:

<res-type>javax.sql.DataSource</res-type>

to

<res-type>javax.sql.ConnectionPoolDataSource</res-type>

Should work now :)

于 2013-09-20T14:58:30.580 回答