Create entity bean from existing Database through glassfish resource (connection pool)

1.4k Views Asked by At

I want to create an entity class from database. My database would be HSQL and i use file to store the data.

I have no problem to config the connection pool to connect to this database @ glassfish The name of the resource which uses the connection pool (HSQL-file) is HSQLJdbcResource:

enter image description here

And no problem to reach this resource from a JSP file, this code works perfectly:

enter image description here

But i do have a problem, when i want to create the entity class from database with the netbeans wizard, because somehow the neatbeans can't find the driver for this :

enter image description here

I have the driver and attached to the project and also i can manage to create the entity class trough std datasource but i want trought glassfish resource, because if dont do the way like this --- the file will be locked because of my JPA which use glassfish resource and connection pool... Vicious Circle, is there any solution for this?

enter image description here

1

There are 1 best solutions below

3
On
  1. Please check to see if the driver path is correct.
  2. Add the hsql driver in your system class path.

Also, this might be helpful: http://hsqldb.org/doc/guide/ch04.html