This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Support deployment of database drivers to the server to enhance the out of box experience of NetBeans, and to get on par with Creator in this area.
*** Issue 90463 has been marked as a duplicate of this issue. ***
Created attachment 40095 [details] javadoc
Created attachment 40096 [details] api diff
For the description of the JDBC driver deployment support please refer to the following document: http://wiki.netbeans.org/wiki/view/JDBCDriverDeployment. List of affected interfaces: org.netbeans.modules.j2ee.deployment.common.api.DatasourceHelper org.netbeans.modules.j2ee.deployment.plugins.spi.JDBCDriverDeployer org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory Using the API_REVIEW_FAST keyword, since the changes are simple and compatible.
Regarding the method for finding database connections for a datasource - you are suggesting this signature: public static List<DatabaseConnection> findDatabaseConnections(Datasource datasource); However, the datasource alignment design document: http://wiki.netbeans.org/wiki/view/VWPDataSourceIntegration proposes the following signature: public static List<DatabaseConnection> findDatabaseConnections(Datasource datasource, boolean tryRegister); Which one is correct? Do we need the tryRegister parameter and what for?
I didn't know about this, I have just taken DatasourceHelper class as it was in j2ee/utilities module. Andrei, do we want to introduce the tryRegister parameter?
Yes, but not now. The tryRegister parameter is needed for the case when no database connection can be found for the data source. If that happens and tryRegister is true, the New Database Connection (and also New JDBC Driver, if needed) will be displayed, letting the user to register a matching connection. The tryRegister parameter is not needed for the driver deployment IMHO.
Concerning the previous comment, when is "not now" ? For driver deployment why not include tryRegister in findDatabaseConnections(...) and just set tryRegister to false ? For visualweb, I have a reference to j2ee/utilities After the change, then, I guess from j2ee module, friend access to org.netbeans.modules.visualweb.dataconnectivity is required
Moving of DatasourceHelper from j2ee/utilities to j2eeserver module was removed from this API change, since it is likely to be changed soon, see John's comment. The API change was merged to trunk Checking in ide/golden/deps.txt; /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.500; previous revision: 1.499 done Checking in ide/golden/friend-packages.txt; /cvs/ide/golden/friend-packages.txt,v <-- friend-packages.txt new revision: 1.134; previous revision: 1.133 done Checking in j2ee/utilities/manifest.mf; /cvs/j2ee/utilities/manifest.mf,v <-- manifest.mf new revision: 1.15; previous revision: 1.14 done Checking in j2ee/utilities/nbproject/project.xml; /cvs/j2ee/utilities/nbproject/project.xml,v <-- project.xml new revision: 1.62; previous revision: 1.61 done Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/Util.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/Util.java,v <-- Util.java new revision: 1.13; previous revision: 1.12 done RCS file: /cvs/j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.nondriver.jar,v done Checking in j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.nondriver.jar; /cvs/j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.nondriver.jar,v <-- org.netbeans.nondriver.jar initial revision: 1.1 done RCS file: /cvs/j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.test.dbdriver.jar,v done Checking in j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.test.dbdriver.jar; /cvs/j2ee/utilities/test/unit/data/testcp/libs/org.netbeans.test.dbdriver.jar,v <-- org.netbeans.test.dbdriver.jar initial revision: 1.1 done RCS file: /cvs/j2ee/utilities/test/unit/data/testcp/shared/libs/org.netbeans.test.dbdriver.jar,v done Checking in j2ee/utilities/test/unit/data/testcp/shared/libs/org.netbeans.test.dbdriver.jar; /cvs/j2ee/utilities/test/unit/data/testcp/shared/libs/org.netbeans.test.dbdriver.jar,v <-- org.netbeans.test.dbdriver.jar initial revision: 1.1 done RCS file: /cvs/j2ee/utilities/test/unit/src/org/netbeans/modules/j2ee/common/UtilTest.java,v done Checking in j2ee/utilities/test/unit/src/org/netbeans/modules/j2ee/common/UtilTest.java; /cvs/j2ee/utilities/test/unit/src/org/netbeans/modules/j2ee/common/UtilTest.java,v <-- UtilTest.java initial revision: 1.1 done Checking in j2eeserver/apichanges.xml; /cvs/j2eeserver/apichanges.xml,v <-- apichanges.xml new revision: 1.26; previous revision: 1.25 done Checking in j2eeserver/nbproject/project.properties; /cvs/j2eeserver/nbproject/project.properties,v <-- project.properties new revision: 1.17; previous revision: 1.16 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Deployment.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Deployment.java,v <-- Deployment.java new revision: 1.25; previous revision: 1.24 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ProgressObjectUtil.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ProgressObjectUtil.java,v <-- ProgressObjectUtil.java new revision: 1.3; previous revision: 1.2 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java,v <-- ServerInstance.java new revision: 1.77; previous revision: 1.76 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java,v <-- ProgressUI.java new revision: 1.20; previous revision: 1.19 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/JDBCDriverDeployer.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/JDBCDriverDeployer.java,v <-- JDBCDriverDeployer.java new revision: 1.2; previous revision: 1.1 done Checking in j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/OptionalDeploymentManagerFactory.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/OptionalDeploymentManagerFactory.java,v <-- OptionalDeploymentManagerFactory.java new revision: 1.3; previous revision: 1.2 done Checking in tomcatint/tomcat5/nbproject/project.xml; /cvs/tomcatint/tomcat5/nbproject/project.xml,v <-- project.xml new revision: 1.21; previous revision: 1.20 done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/Bundle.properties; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/Bundle.properties,v <-- Bundle.properties new revision: 1.36; previous revision: 1.35 done RCS file: /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatJDBCDriverDeployer.java,v done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatJDBCDriverDeployer.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatJDBCDriverDeployer.java,v <-- TomcatJDBCDriverDeployer.java initial revision: 1.1 done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManager.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManager.java,v <-- TomcatManager.java new revision: 1.90; previous revision: 1.89 done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/OptionalFactory.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/OptionalFactory.java,v <-- OptionalFactory.java new revision: 1.10; previous revision: 1.9 done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java,v <-- StartTomcat.java new revision: 1.88; previous revision: 1.87 done Checking in tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java,v <-- TomcatProperties.java new revision: 1.17; previous revision: 1.16 done
F.
Seems drivers are not copied. * Create new Java EE 5 Web Application with Visual web framework, Glassfish as target server * Register Oracle driver and connection * drag and drop an Oracle table to the visual web page * deploy drivers not copied
Seems drivers are not copied. * Create new Java EE 5 Web Application with Visual web framework, Glassfish as target server * Register Oracle driver and connection * drag and drop an Oracle table to the visual web page * deploy drivers are not copied to the application server's classpath
NBI Build: 200704270000 WinXp JDK 1.6 Tried this on both Oracle10G and MySQL5. 1.Create a VWP app with Sun AS9(b41d) as target server. 2.Drag a table component. 3.Add a jdbc driver for Oracle/Mysql 4.Connect to a database server instance 5.Drag a Db table onto the table component. At design time the table will be bind to the data. 6.On deployment exceptions are thrown in the server log and the page is empty. WA: Copy the driver to the Sun_ASServer/lib folder and then redeploy. Table will come up with all of the data. I am attaching the server log.
Created attachment 41910 [details] server log for Sun AS9 with Mysql5
The reason for drivers not getting deployed appears to be that visualweb also needs to implement some methods described in the spec.
Update: NB M9 Build: 200704280000 I tried Mysql and JavaDb with Tomcat 5.5.17 and I am having no problems. I don't need to copy the jars in that case. Still having problems with Glassfish though. TC5.5.23 and TC6 seem to have a different issue with databinding: http://www.netbeans.org/issues/show_bug.cgi?id=89439
Closing as FIXED. Please note that this issue is about API, not about support in the specific server plug-in. Tomcat support was added only as a kind of reference implementation. There is a different issue filed against GlassFish to implement this API.
Here is the issue for Sun AS: http://www.netbeans.org/issues/show_bug.cgi?id=99610 And this is for JBoss: http://www.netbeans.org/issues/show_bug.cgi?id=99609