Jorge G.
Jorge G.

Reputation: 93

Data Source wizard from Netbeans does not retrieve any table

I have created a JDBC connection pool and a JDBC resource using that pool. I tested the connection and it pings. I executed a SQL command in NetBeans from the service tab in the database option (it also worked).

I added the glassfish-resources.xml.

Problem:
I try to create an entity class from database in Java, using the NetBeans wizard, but when I choose the data source (JDBC I recently created) it does not retrieve any table.

Any idea what could be happening?

Upvotes: 0

Views: 1941

Answers (1)

Jorge G.
Jorge G.

Reputation: 93

in Netbeans, in services tab, under the connection that I created, i choose the database that i needed as default.

1) Click services tab.

2) Expand "Databases" option.

3) Expand the recently connection created.

4) Look for the databases needed, right click and click "Set as default catalog".

5) Go to the web project again, right click: New -> Entity classes from database.

6) In data source drop down list, select "New data source", give a JDNI name and select the database connection needed. click finish. Tables should appear right away.

Greetings!

Upvotes: 2

Related Questions