The database JDBC drivers must be either set in the GlassFish JVM classpath (preferred) or placed in the /glassfish/lib directory before you create the connection pools. This is not necessary for the Derby (JavaDB) database, but is required for Oracle or MySQL. For example, if you are using JDK 6, you would set your GlassFish JVM classpath to the ojdbc6.jar file, which is the Oracle database JDBC driver file for JVM 6.
Open the GlassFish Admin Console. To access the Admin Console, do the following:
From the Services window of the NetBeans IDE, start the GlassFish server.
Right-click the GlassFish server and select View Admin Console from the popup menu.
The login screen of the Admin Console appears.
Open the Admin Console using the default username and password:
To access the GlassFish JVM classpath settings:
In the Classpath Suffix field, type the full path for your database JDBC driver on your local directory. For example, C:\GlassFishESB\drivers\oracle11gDriver\ojdbc6.jar.
Click Save, and restart GlassFish.
Additional steps must be taken when setting the GlassFish JVM Classpath to the Database drivers in a clustered environment. For additional information see Configuring the BPEL Service Engine for Clustering in Configuring GlassFish ESB for Clustering.