File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes NetBeans and Database pools Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "NetBeans and Database pools" Watch "NetBeans and Database pools" New topic
Author

NetBeans and Database pools

Mike Tabak
Ranch Hand

Joined: Mar 31, 2012
Posts: 43
I'm working with a NetBeans project which has a servlet that accesses the MySQL database using a connection pool. With the code completed the name of the project is red indicating a problem. When I right click on the project name at the bottom I see "Resolve data source problem". When I click on that I get a Resolve Data Sources pop-up. I fill in the appropriate info and close it, but the project name remains red and when I right click on it I get the same error about data sources. However, when I deploy to Tomcat everything works perfectly. Any ideas why the project name remains red with the same error? (there are no red indications on any of the packages). I am using NetBeans 7.1.2.

Thanks
Mike
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

This is just a guess, but could it be that NetBeans needs the MySQL JDBC driver to be registered to verify the database URL?


JBoss In Action
Mike Tabak
Ranch Hand

Joined: Mar 31, 2012
Posts: 43
The driver info id in the WEB-INF/context.xml, doesn't this register it? Would the program still work with an unregitered driver?

Thanks
Mike
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

No, that would not register it. The JAR file for the driver must be registered with NetBeans, probably by including the driver JAR in the list of JARs for the project.
 
 
subject: NetBeans and Database pools