My database driver is in WEB-INF/lib but I still can't access the database. What do I do?

If your application connects to the database directly through JDBC (that is, it uses DriverManager.getConnection() to obtain a connection), then putting the driver in WEB-INF is sufficient. However, if you are connecting to the database through the server, you need to put the driver in the server's shared library directory or the server's common library directory, depending on the server. You must also set up a connection pool.

For details concerning older versions of NetBeans, see the Connecting to Databases chapter of the archived "Using NetBeans IDE 5.0" document.

Applies to: NetBeans 4.0, 4.1, 5.0

Platforms: All

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo