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.
To improve the out-of-box-experience for database development in NetBeans, if accepted, we will include 3rd party open source JDBC driver jar files in NetBeans 6 beta2. The following drivers, jTDS 1.2.1, MySQL® Connector/J 5.0.7 and Postgres 8.2-506 JDBC drivers (including license files for each jar file) are to be included with NetBeans See URL field above for the UI spec.
How "tested" are these drivers in the GF environment? Could you provide more details about the 'test this task' item.... Is there a test plan for this? Who will be executing the test plan? How many modules are you creating? 3 (one for each driver) or 1 (for all three drivers)
AFAIK these drivers have been used in testing since NetBeans 5.5. More info on how much testing has been done will be available soon. These drivers have been tested in visualweb with Glassfish. If a module wrapper is actually required then 1 module wrapper for a zip file drivers-1.0.zip and CDDL license
PP01: I have a doubt about the planed zip file drivers-1.0.zip. What is the reason put these three jars in one zip file? These are different libraries and they can have different licenses. How you will do the updates? Does it mean that if one driver will be updated then you will update the zip file version as well? IMHO it looks strange. There are a zip files like sruts-x.x.x.zip or jsf-x.x.x.zip but this is really one library. PP02: The suggested libs/drivers/external doesn't fit me. Probably better will be just drivers/external. In the drivers forlder there should be the wrapper.
JB01 >PP01: I have a doubt about the planed zip file drivers-1.0.zip. What is the reason put these three jars in one zip file? >These are different libraries and they can have different licenses. How you will do the updates? Does it mean that if >one driver will be updated then you will update the zip file version as well? IMHO it looks strange. There are a zip >files like sruts-x.x.x.zip or jsf-x.x.x.zip but this is really one library. Including multiple drivers in one zip file eases setup and maintenance. Setup for the library wrapper module for each driver takes more time, it's more work. Maintenance also takes more time if a driver needs to to be updated. Yes, if one driver needs to be updated then the whole zip file will be updated. I heard there are some modules that follow this approach. There isn't a convention, so I don't see a big issue with bundling multiple drivers in one zip, except that it looks strange JB02 >PP02: The suggested libs/drivers/external doesn't fit me. Probably better will be just drivers/external. In the drivers >forlder there should be the wrapper. Agree, I'll update the document JB03 From feedback by email, jTDS hasn't been tested much so, it looks like jTDS won't be bundled
> Including multiple drivers in one zip file eases setup and maintenance. How exactly? If you have a single zip file you need to unzip it during the build, if nothing else. Can you please state the scenarios where the single zip files "eases setup and maintenance"? > Setup for the library wrapper module for each driver takes more time, it's > more work. How exactly? I think you can still have a single wrapper module bundling all three drivers. > Maintenance also takes more time if a driver needs to to be > updated. Again, I don't see how. If all that you put in the repository is a zip file, when you need to update a driver you need to unzip the file, replace the driver, zip the file, increase its version number, remove the old zip file from the repository and commit the new one. Whereas if you just store the drivers jar files in the repository you just remove the old and commit the new driver jar file. (You also need to update the references to the old jar file, but you need to to that in both cases.) Another thing is the license of the drivers-1.0.zip file. How exactly will this file look like when each driver can potentially have its own license, definitely different from CDDL?
Earlier feedback suggested to lessen the library module wrapper work and put all drivers in one zip file. This plan to include the drivers is a really a small task, but, as suggested by others, additional incremental work adds up. In addition to changing the jar file version, the license file version also. The first version of the plan, I did suggest one library module wrapper per jar. http://wiki.netbeans.org/wiki/view/Bundling3rdPartyJDBCDriverJars?version=37 One library wrapper per driver is fine with me. I don't anticipate many upgrades to the drivers. If the intricate method of bundling libraries is important then there should be a convention should be explained in the external libraries document: http://wiki.netbeans.org/wiki/view/DevFaqExternalLibrariesUpdated
I'm not suggesting to have one library wrapper per driver. We won't allow the users to enable and disable the individual modules anyway. There is a single Database plugin that the user can install and uninstall in the plugin manager, which includes all database features. I would put all drivers in a single library wrapper if possible. The only complication could be the module license, which would probably need be a compilation of the licenses of all bundled drivers. But that "compiled" license doesn't need to be checked into the CVS, it can be generated on the fly during the build. (Whereas if you go the single zip file way you'll have to commit the compiled license in to the CVS.)
> I'm not suggesting to have one library wrapper per driver. Now clear. Earlier comments appeared to suggest one library wrapper per driver > The only complication could be the module license, > which would probably need be a compilation of the licenses of all bundled drivers. No we don't need to concatenate the licenses. Each license per driver can be stored in /external. Each license text file will be named accordingly and will have an OSR header, if required. The drivers most likely have to be updated frequently, so the driver jar will be included as is (not in a zip file) Using a single library wrapper module, here's a picture, this will be added to the spec: db_ |_ libs |_ external |_ mysql-connector-java-5.0.7-bin.jar |_ mysql-connector-java-5.0.7-license.txt |_ postgresql-8.2-504.jdbc3.jar |_ postgresql-8.2-504.jdbc3-license.txt
The module path should probably be db/drivers, as agreed in desc5. Regarding the license: yes, that's how the repository will look like. But I meant the license of the NBM that will be built from the module. I think (not sure though) that license will somehow need to include all licenses of the bundled drivers.
The nbm for the drivers will be bundled. AFAIK, no license file is required for bundled modules
In the spec, I mention that the drivers are to be registered at startup, if they hadn't been registered already. As a result, for the first time IDE startup there will be a few milliseconds hit. Please respond if there's a better alternative or objection
A few milliseconds doesn't seem like a problem, but if you think it might be, what if you instead register them the first time the Drivers node is opened?
Yes, this is what I do for Sample databases, wait for the IDE to startup WindowManager.getDefault().invokeWhenUIReady(new Runnable() { public void run() { // Register 3rd party drivers, if needed } } );
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-db/overview-summary.html See the "Registering JDBC Drivers" section.
Thanks, Andrei. Very good to have you around to point us to these sorts of things. John - do you think that would work for you? Also: shouldn't we set the Target Milestone for this issue to beta2?
Spec was updated, using layer file is much cleaner Since no objection for implementing, changing target to beta2
Bundling and registering the 2 drivers is almost completely working now. One remaining issue is http://www.netbeans.org/issues/show_bug.cgi?id=117005 The nbm will include a compiled license. This was verified. I'll attach diffs to this issue
Created attachment 49722 [details] diff of nbbuild (changes to cluster.properties and nbbuild/licenses)
Created attachment 49723 [details] new db/drivers contents listed by diff -N -u
diffs of changes and additions to make. Library wrapper created. ant verify-libs-and-licenses was executed and there was 1 warning each for the license file - "db/drivers/external/postgresql-8.2-506.jdbc4-license.txt contains a license body which does not match that in nbbuild/licenses/BSD" and "/drivers/external/mysql-connector-java-5.0.7-license.txt contains a license body which does not match that in nbbuild/licenses/GPL " I couldn't tell if there was an error in the verification script since there are occurrences of this warning for many other licenses. I'll ask about this. Also the library wrapper was tested with a recent trunk build and as a result, both Postgres and MySQL drivers were registered in the Services tab. As mentioned earlier, if I'm correct, issue 117005 should be fixed for the libraries to completely work. I thought that driver config files would be created in the userdir under config/Databases but it turns out that the config files are not necessary when using the JDBC Driver layer method. http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-db/overview-summary.html
Also changes to the db mf-layer and addition of the JDBC Driver registration XML files described in the next attached diff
Created attachment 49724 [details] changes to the db mf-layer and addition of the JDBC Driver registration XML files
Also, note the license created for the nbm is a compiled license (1 license for both Postgres and MySQL, also includes CDDL) - this has been verified
extra.license.files=external/mysql-connector-java-5.0.7-license.txt,\ external/postgresql-8.2-506.jdbc4-license.txt release.external/mysql-connector-java-5.0.7-bin.jar=modules/ext/mysql-connector-java-5.0.7-bin.jar release.external/postgresql-8.2-506.jdbc4.jar=modules/ext/postgresql-8.2-506.jdbc4.jar 1. Avoid using extra.license.files unless it is actually necessary. When licenses are properly named and associated with release.external/* files, it is not. 2. You need mysql-connector-java-5.0.7-bin-license.txt ^^^^ to match the JAR name.
>2. You need mysql-connector-java-5.0.7-bin-license.txt > ^^^^ >to match the JAR name. After renaming mysql-connector-java-5.0.7-license.txt to mysql-connector-java-5.0.7-bin-license.txt, ant verify-libs-and-licenses complained "db/drivers/external/mysql-connector-java-5.0.7-bin.jar is not associated with any license file "
Not sure, should work, double check spelling etc. and if necessary debug the task.
John, the name of the license file should be "mysql-connector-java-5.0.7-bin-license.txt" not "mysql-connector-java-5.0.7-bin.txt". Note that you're missing "-license" in the name.
no, I renamed as suggested in desc25. See desc26 for the new name I still get the error msg from ant verify-libs-and-licenses "db/drivers/external/mysql-connector-java-5.0.7-bin.jar is not associated with any license file "
desc 26 says After renaming mysql-connector-java-5.0.7-license.txt to mysql-connector-java-5.0.7-bin-license.txt, ant verify-libs-and-licenses complained "db/drivers/external/mysql-connector-java-5.0.7-bin.jar is not associated with any license file "
$ ls -al total 1983 drwxrwxrwx 1 JohnBaker None 0 Sep 28 11:50 . drwxrwxrwx 1 JohnBaker None 0 Sep 28 11:50 .. drwxrwxrwx 1 JohnBaker None 0 Sep 27 21:51 CVS -rwxrwxrwa 1 JohnBaker None 18698 Sep 28 11:39 mysql-connector-java-5.0.7-bin-license.txt -rwxrwxrwa 1 JohnBaker None 536609 Jul 18 20:26 mysql-connector-java-5.0.7-bin.jar -rwxrwxrwa 1 JohnBaker None 1970 Sep 28 11:30 postgresql-8.2-506.jdbc4-license.txt -rwxrwxrwa 1 JohnBaker None 456996 Sep 22 16:21 postgresql-8.2-506.jdbc4.jar ant verify-libs-and-licenses complains "db/drivers/external/mysql-connector-java-5.0.7-bin.jar is not associated with any license file "
restoring the mysql license to the name I gave, originally, $ ls -al total 1983 drwxrwxrwx 1 JohnBaker None 0 Sep 28 11:55 . drwxrwxrwx 1 JohnBaker None 0 Sep 28 11:55 .. drwxrwxrwx 1 JohnBaker None 0 Sep 27 21:51 CVS -rwxrwxrwa 1 JohnBaker None 536609 Jul 18 20:26 mysql-connector-java-5.0.7-bin.jar -rwxrwxrwa 1 JohnBaker None 18698 Sep 28 11:39 mysql-connector-java-5.0.7-license.txt -rwxrwxrwa 1 JohnBaker None 1970 Sep 28 11:30 postgresql-8.2-506.jdbc4-license.txt -rwxrwxrwa 1 JohnBaker None 456996 Sep 22 16:21 postgresql-8.2-506.jdbc4.jar the only warning from ant verify-libs-and-licenses is "/drivers/external/mysql-connector-java-5.0.7-license.txt contains a license body which does not match that in nbbuild/licenses/GPL "
Perhaps you neglected to cvs add the new JAR. Only CVS-controlled files are examined in general.
in desc25 >1. Avoid using extra.license.files unless it is actually necessary. When licenses are properly named and associated with > release.external/* files, it is not. I believe the extra.license.files setting is necessary as these 3rd party libraries require their own licenses project.properties (CDDL snip'd) extra.license.files=external/mysql-connector-java-5.0.7-bin-license.txt,\ external/postgresql-8.2-506.jdbc4-license.txt release.external/mysql-connector-java-5.0.7-bin.jar=modules/ext/mysql-connector-java-5.0.7-bin.jar release.external/postgresql-8.2-506.jdbc4.jar=modules/ext/postgresql-8.2-506.jdbc4.jar
$ cvs status mysql-connector-java-5.0.7-bin.jar =================================================================== File: mysql-connector-java-5.0.7-bin.jar Status: Locally Added Working revision: New file! Repository revision: No revision control file Sticky Tag: (none) Sticky Date: (none) Sticky Options: -kb
I will go ahead and integrate changes. If anything is not exactly correct then I'll fix later
I'm running Sanity tests on db module. Currently there's 1 unexpected failure that I'm looking into: [printSummary] [printSummary] Test Results Summary (from the current test run): [printSummary] [printSummary] Expected Passes: 52 Unexpected Passes: 0 [printSummary] Expected Fails: 0 Unexpected Fails: 1 Errors: 0 [printSummary] Total: 53 Success Rate: 98.11% [printSummary]
extra.license.files is only needed when normal name patterns are not being followed. If you name licenses in the recommended ways, they are found automatically when those binaries are copied to the cluster. Try "ant nbm" without this property - it ought to work, putting all associated licenses (as well as CDDL for the module itself) into Info.xml.
Neither driver license file is bundled in the nbm when excluding extra.license.files . Either I rename the license file and fail verification or I'll have to include extra.license.files
AFAIK extra.license.files should not be needed, and the license file must be named ...-bin-license.txt to match the JAR. If you are having any problems with this, please debug at the Ant task level (seeking assistance as needed); do not ignore. I can assist if files are in CVS.
Library wrapper module and drivers with licenses checked in Checking in nbbuild/cluster.properties; /cvs/nbbuild/cluster.properties,v <-- cluster.properties new revision: 1.422; previous revision: 1.421 done RCS file: /cvs/nbbuild/licenses/BSD,v done Checking in nbbuild/licenses/BSD; /cvs/nbbuild/licenses/BSD,v <-- BSD initial revision: 1.1 done RCS file: /cvs/db/drivers/build.xml,v done Checking in db/drivers/build.xml; /cvs/db/drivers/build.xml,v <-- build.xml initial revision: 1.1 done RCS file: /cvs/db/drivers/manifest.mf,v done Checking in db/drivers/manifest.mf; /cvs/db/drivers/manifest.mf,v <-- manifest.mf initial revision: 1.1 done RCS file: /cvs/db/drivers/external/mysql-connector-java-5.0.7-bin-license.txt,v done Checking in db/drivers/external/mysql-connector-java-5.0.7-bin-license.txt; /cvs/db/drivers/external/mysql-connector-java-5.0.7-bin-license.txt,v <-- mysql-connector-java-5.0.7-bin-license.txt initial revision: 1.1 done RCS file: /cvs/db/drivers/external/mysql-connector-java-5.0.7-bin.jar,v done Checking in db/drivers/external/mysql-connector-java-5.0.7-bin.jar; /cvs/db/drivers/external/mysql-connector-java-5.0.7-bin.jar,v <-- mysql-connector-java-5.0.7-bin.jar initial revision: 1.1 done RCS file: /cvs/db/drivers/external/postgresql-8.2-506.jdbc4-license.txt,v done Checking in db/drivers/external/postgresql-8.2-506.jdbc4-license.txt; /cvs/db/drivers/external/postgresql-8.2-506.jdbc4-license.txt,v <-- postgresql-8.2-506.jdbc4-license.txt initial revision: 1.1 done RCS file: /cvs/db/drivers/external/postgresql-8.2-506.jdbc4.jar,v done Checking in db/drivers/external/postgresql-8.2-506.jdbc4.jar; /cvs/db/drivers/external/postgresql-8.2-506.jdbc4.jar,v <-- postgresql-8.2-506.jdbc4.jar initial revision: 1.1 done RCS file: /cvs/db/drivers/nbproject/project.properties,v done Checking in db/drivers/nbproject/project.properties; /cvs/db/drivers/nbproject/project.properties,v <-- project.properties initial revision: 1.1 done RCS file: /cvs/db/drivers/nbproject/project.xml,v done Checking in db/drivers/nbproject/project.xml; /cvs/db/drivers/nbproject/project.xml,v <-- project.xml initial revision: 1.1 done RCS file: /cvs/db/drivers/src/org/netbeans/modules/db/drivers/Bundle.properties,v done Checking in db/drivers/src/org/netbeans/modules/db/drivers/Bundle.properties; /cvs/db/drivers/src/org/netbeans/modules/db/drivers/Bundle.properties,v <-- Bundle.properties initial revision: 1.1 done
A concatenated license is generated correctly for the nbm It seems the verification is not working correctly. The library wrapper with drivers and licenses has been integrated I installed the nbm and the generated license appeared. However, the nbm is not signed
The NBM will not be signed unless you pass a keystore and storepass, which presumably you cannot do since you do not have them. Don't worry about that.
The installation of the nbm is fine, the driver jars get created in ide8/modules/ext The next part is adding entries to the db layer file and xml files and updating a unit test. I don't know what to do with the verification of the libraries
Note that since this module is AutoUpdate-Show-In-Client: false, it must be included as part of some kit module, or it will not be available to the Plugin Manager. (The javadoc-nbms project should report this as a test failure on its next run if not corrected, I think.)
Thanks for catching this I'll set AutoUpdate-Show-In-Client to true
I think I corrected the license failure, due to a superfluous para: Checking in db/drivers/external/postgresql-8.2-506.jdbc4-license.txt; /shared/data/ccvs/repository/db/drivers/external/postgresql-8.2-506.jdbc4-license.txt,v <-- postgresql-8.2-506.jdbc4-license.txt new revision: 1.2; previous revision: 1.1 done Also generifying the BSD template better: Checking in nbbuild/licenses/BSD; /shared/data/ccvs/repository/nbbuild/licenses/BSD,v <-- BSD new revision: 1.2; previous revision: 1.1 done
Thanks I still get db/drivers/external/mysql-connector-java-5.0.7-bin-license.txt contains a license body which does not match that in nbbuild/licenses/GPL db/drivers/external/postgresql-8.2-506.jdbc4-license.txt contains a license body which does not match that in nbbuild/licenses/BSD I'll make sure my workspace is up-to-date
I don't get those warnings. Neither does deadlock: http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/build/verifylibsandlicenses.xml/*view*/
That's odd. I checked out a new workspace and still see the warnings (and made sure all is up-to-date) I'm running on Windows if this is the reason. I can try on Solaris
It's possible the task does not handle CRNL line endings; I have not personally checked (I run Linux). If that is the case, please file a bug for me in nbbuild.
Drivers are now bundled. A couple of remaining issues to resolve 11705 and also add more text to the nbm description cvs commit: Examining db/src/org/netbeans/modules/db/resources RCS file: /cvs/db/src/org/netbeans/modules/db/resources/MYSQL.xml,v done Checking in db/src/org/netbeans/modules/db/resources/MYSQL.xml; /cvs/db/src/org/netbeans/modules/db/resources/MYSQL.xml,v <-- MYSQL.xml initial revision: 1.1 done RCS file: /cvs/db/src/org/netbeans/modules/db/resources/POSTGRES.xml,v done Checking in db/src/org/netbeans/modules/db/resources/POSTGRES.xml; /cvs/db/src/org/netbeans/modules/db/resources/POSTGRES.xml,v <-- POSTGRES.xml initial revision: 1.1 done Checking in db/src/org/netbeans/modules/db/resources/mf-layer.xml; /cvs/db/src/org/netbeans/modules/db/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.16; previous revision: 1.15 done
Remaining issue, 11705 and the nbm long description have been resolved
Reopening, in case there's more to do. Here's links to licenses: http://db.netbeans.org/source/browse/db/drivers/external/mysql-connector-java-5.0.7-bin-license.txt?rev=1.1&content-type=text/vnd.viewcvs-markup http://db.netbeans.org/source/browse/db/drivers/external/postgresql-8.2-506.jdbc4-license.txt?rev=1.1&content-type=text/vnd.viewcvs-markup
I ran "ant verify-libs-and-licenses" and it doesn't complain about anything in db/drivers. John, do you plan to do anything more in this issue or can it be closed?
No nothing more to add. Just left open for changes. Task has been completed, marking as Fixed