You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/07/06 00:39:04 UTC

[jira] Created: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
----------------------------------------------------------------------------------------

                 Key: DERBY-2906
                 URL: https://issues.apache.org/jira/browse/DERBY-2906
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.2.2.0, 10.3.0.0, 10.3.1.0, 10.4.0.0
            Reporter: Daniel John Debrunner
            Priority: Minor


Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan resolved DERBY-2906.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.1.5
                   10.2.2.1

Merged to 10.2 and 10.3 with 'svn merge -c 566216 https://svn.apache.org/repos/asf/db/derby/code/trunk .'
Had to fix a conflict for 10.2 (move a line in two places). Also fixed a spelling error ('unneccesary' -> 'unnecessary').

Committed in 10.2 with 570669 and 10.3 with 570671.
Fixed the spelling error in trunk with revision 570673.

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.2.2.1, 10.3.1.5, 10.4.0.0
>
>         Attachments: derby-2906-1a.diff
>
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2906:
-----------------------------------

       Derby Info:   (was: [Patch Available])
    Fix Version/s: 10.4.0.0

Committed 'derby-2906-1a.diff' to trunk with revision 566216. Will port the fix when I'm sure there are no problems with it.

I also plan to create a very small patch for calling an already existing ant routine instead of doing things manually. This will most likely only go into trunk.

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-2906-1a.diff
>
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2906:
-----------------------------------

    Attachment: derby-2906-1a.diff

'/tmp/derby-2906-1a.diff' adds a delete action to the start of each jar build target.
This ensures that nothing more than necessary is included in the jar file (primarily from the META-INF directory), and it also requires the targets to add everything that is needed themselves.

I compared the contents in the jars, and the only change I observed was the exclusion of the META-INF/services directory from jars that shouldn't autoload a Derby driver (only derby.jar and derbyclient.jar should).

Note that I added the delete action to all jar build targets.

I'm running suites.All. Unless I get pushback, I will commit tomorrow and then merge the fix to the other branches in a week or so.

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-2906-1a.diff
>
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2906:
-----------------------------------

    Derby Info: [Patch Available]

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-2906-1a.diff
>
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520206 ] 

Kristian Waagan commented on DERBY-2906:
----------------------------------------

Committed a trival fix to trunk with revision 566660.
Didn't produce a patch file, because there was only one target that needed the change.

Replaced 4 lines of code creating and copying dir/files with a call to a method that does the same.

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-2906-1a.diff
>
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514979 ] 

Kristian Waagan commented on DERBY-2906:
----------------------------------------

I had a look at this issue.
There seems to be several ways to solve the problem and a few of them are:
 a) Delete the META-INF/services after the jar has been packaged (derby.jar and derbyclient.jar).
 b) Tighten the filters selecting which files to include from the META-INF directory.
 c) Order the jar build targets to avoid the problem

The problem arises because the build targets for the jars share the same "scratch space" and nothing is cleaned between the targets.
I will have a look and see which solution I opt for. Feedback up front is welcome.
Option c is too fragile and might cause problems if users build separate jars.
Option a is a two line fix (+comments).
I don't know enough to say if option b is sound, but it would probably be the safest one against future changes/additions.

I also discovered some jar build targets use an antcall, whereas others do the same "manually". I might also clean this up as part of this (separate diff, same issue).

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-2906) derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan reassigned DERBY-2906:
--------------------------------------

    Assignee: Kristian Waagan

> derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2906
>                 URL: https://issues.apache.org/jira/browse/DERBY-2906
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0, 10.3.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kristian Waagan
>            Priority: Minor
>
> Only the jar files that contain the driver should have the autoloading services file for the JDBC driver.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.