开发者

Creating new entity classes from database in Netbeans and Glassfish

开发者 https://www.devze.com 2023-04-09 13:38 出处:网络
I am trying to create entity classes from database for my JPA/Hibernate project in Netbeans (7.0) IDE with Glassfish server (3.1)

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

精彩评论

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

关注公众号