开发者

Creating new entity classes from database in Netbeans and Glassfish

I am trying to create entity classes from database for my JPA/Hibernate project in Netbeans (7.0) IDE with Glassfish server (3.1)

But I get the following error when selecting the datasource from the "New Entity Classes from Database" wizard:

    Unable to find the driver com.mysql.jdbc.jdbc2.optional.MysqlDataSource. 
    Register this driver in the Databases tab.

Please note that the MySQL driver is properly installed in the Glassfish server, IDE and in the proje开发者_如何学Goct itself.


The database settings inside Netbeans aren't the same as the ones inside GlassFish.

In Netbeans, got to Window and select Services. On that form you'll see a database section. This is where the database you are selecting needs to be configured. Once you have it set up you can test it by right clicking and trying to connect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜