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 "Dibyendu Majumdar (JIRA)" <ji...@apache.org> on 2008/02/23 00:19:19 UTC

[jira] Created: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
-----------------------------------------------------------------------------------------

                 Key: DERBY-3451
                 URL: https://issues.apache.org/jira/browse/DERBY-3451
             Project: Derby
          Issue Type: Sub-task
            Reporter: Dibyendu Majumdar


In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
org.apache.derby.impl.jdbc.Util
org.apache.derby.impl.jdbc.EmbedSQLException

This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

To remove this dependency, following changes have been made.

A new interface called DerbySQLException has been added to org.apache.derby.iapi.error.
The EmbedSQLException class has been modified to implement this interface.
The StandardException calls the isSimpleWrapper method on the DerbySQLException interface, thereby avoiding a need to reference EmbedSQLException.

A new static method getArgumentFerry() has been added to StandardExcepion. This performs the same task as the current getArgumentFerry() method in SQLExceptionFactory and SQLExceptionFactory40.
SQLExceptionFactory.getArgumentFerry() has been amended to call StandardException.getArgumentFerry().
SQLExceptionFactory40.getArgumentFerry() has been removed.
StandardException.getArgumentFerry() now handles the pre-JDBC3 and post-JDBC4 scenarios (in the pre-JDBC4 scenario, the passed argument is a DerbySQLException, which is returned immediately), so there is no need to override this functionality.

This change allows us to avoid having a dependency between StandardException and Util.
As the getArgumentFerry() method now checks for DerbySQLException rather than EmbedSQLException, it is able to avoid dependency on EmbedSQLException.

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


Re: [jira] Issue Comment Edited: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by Daniel John Debrunner <dj...@apache.org>.
Myrna van Lunteren wrote:
> On 2/23/08, Dibyendu Majumdar (JIRA) <ji...@apache.org> wrote:
>> Test results:
>>
>> I also ran junit-all on Mac OS X, suing Java 1.5.
>> There were following failures:
>>
>>    [junit] Tests run: 0, Failures: 2, Errors: 0, Time elapsed: 1.131 sec
>>    [junit] Test org.apache.derbyTesting.functionTests.tests.demo._Suite FAILED
>>
>> Looks like failure was due to:
>>  <testcase classname="org.apache.derbyTesting.junit.SupportFilesSetup" name="unknown" time="0.0010">
>>    <failure message="org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif

>>
> I'll have a look at that failure...Has anyone else seen that (i.e.
> does it occur without the patch?)

I didn't see it with the patch, but running 1.5 on windows.

Dan.

Re: [jira] Issue Comment Edited: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by Myrna van Lunteren <m....@gmail.com>.
On 2/23/08, Dibyendu Majumdar (JIRA) <ji...@apache.org> wrote:
> Test results:
>
> I also ran junit-all on Mac OS X, suing Java 1.5.
> There were following failures:
>
>    [junit] Tests run: 0, Failures: 2, Errors: 0, Time elapsed: 1.131 sec
>    [junit] Test org.apache.derbyTesting.functionTests.tests.demo._Suite FAILED
>
> Looks like failure was due to:
>  <testcase classname="org.apache.derbyTesting.junit.SupportFilesSetup" name="unknown" time="0.0010">
>    <failure message="org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif
>        at org.apache.derbyTesting.junit.SupportFilesSetup.copyFiles(SupportFilesSetup.java:174)
>        at org.apache.derbyTesting.junit.SupportFilesSetup.access$000(SupportFilesSetup.java:64)
>        at org.apache.derbyTesting.junit.SupportFilesSetup$1.run(SupportFilesSetup.java:139)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.SupportFilesSetup.privCopyFiles(SupportFilesSetup.java:135)
>        at org.apache.derbyTesting.junit.SupportFilesSetup.setUp(SupportFilesSetup.java:120)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
> </failure>
>  </testcase>
>
I'll have a look at that failure...Has anyone else seen that (i.e.
does it occur without the patch?)
Myrna

[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573268#action_12573268 ] 

Knut Anders Hatlen commented on DERBY-3451:
-------------------------------------------

> The main reason originally for EmbedSQLException originally was to be able to
> keep the original non-SQLException (e.g. StandardException, IOException), which is (should be?) now handled by Throwable.initClause().

Another reason for EmbedSQLException is to be able to keep the message id so that we can localize the messages correctly on the network client. I haven't seen any proposals for how to solve that issue yet. (That's why we create the argument ferry (an EmbedSQLException) in the JDBC 4.0 exception factory.)

> Throwing a non-java library exception causes some issues for JMX as the exception can not be transfered to the client.

Solving this problem involves getting rid of StandardException too, doesn't it? At least when the SQLException is linked to a StandardException.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571644#action_12571644 ] 

Dibyendu Majumdar commented on DERBY-3451:
------------------------------------------

The submitted patch was generated using Mercurial. If the patch is not in the correct format, please let me know.
I ran derbyall test suite (using Java 6 on CentOS 5.1). 482 out of 495 tests passed (10 suites were skipped).
The failures don't seem to be related to the changes, but to verify I am running the tests again after having the removed my patches.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571683#action_12571683 ] 

Dibyendu Majumdar commented on DERBY-3451:
------------------------------------------

Ran junit-all on MAC OS X, using Java 1.5. All junit-core tests passed. junit-jdbc4 tests were not run.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Attachment:     (was: DERBY-3451_patch_1.txt)

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571763#action_12571763 ] 

Dibyendu Majumdar commented on DERBY-3451:
------------------------------------------

The patch applies successfully if you use the patch command as follows:

patch -p1 < DERBY-3451_patch_1.txt

To use Eclipse apply patch, ignore leading path name segments should be set to 1.
However, the Eclipse apply patch fails because it seems to require exact match of base revisions. The patch was created on a snapshot of trunk that is a few days old, and in the meantime, StandardException appears to have changed.

I can use svn diff, but am unsure how to manage multiple patches against trunk using svn. 
Mercurial allows me to maintain my changes as a series of patches, that I can keep separate from the trunk. 

In the meantime if I update my local repository and recreate the patch, it should apply against the latest revision in trunk.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Assigned: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar reassigned DERBY-3451:
----------------------------------------

    Assignee: Dibyendu Majumdar

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Derby Info: [Patch Available]

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572279#action_12572279 ] 

Dibyendu Majumdar commented on DERBY-3451:
------------------------------------------

Kristian and Dan,
Thanks - much impressed by the support you have given me.



> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Issue Comment Edited: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571830#action_12571830 ] 

dibyendumajumdar edited comment on DERBY-3451 at 2/23/08 6:17 PM:
-------------------------------------------------------------------

Revised patch - created at revision 630512.

Patch was created using Mercurial. See comments above for details on how to apply either using patch command or using Eclipse.

Test results:

derbyall ran on CentOS 5.1 using Java 6. Out of 250 tests, 2 failed. Looks like failures were caused by SQLException being output with stack trace.

I also ran junit-all on Mac OS X, suing Java 1.5.
There were following failures:

    [junit] Tests run: 0, Failures: 2, Errors: 0, Time elapsed: 1.131 sec
    [junit] Test org.apache.derbyTesting.functionTests.tests.demo._Suite FAILED

Looks like failure was due to:
  <testcase classname="org.apache.derbyTesting.junit.SupportFilesSetup" name="unknown" time="0.0010">
    <failure message="org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif
        at org.apache.derbyTesting.junit.SupportFilesSetup.copyFiles(SupportFilesSetup.java:174)
        at org.apache.derbyTesting.junit.SupportFilesSetup.access$000(SupportFilesSetup.java:64)
        at org.apache.derbyTesting.junit.SupportFilesSetup$1.run(SupportFilesSetup.java:139)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derbyTesting.junit.SupportFilesSetup.privCopyFiles(SupportFilesSetup.java:135)
        at org.apache.derbyTesting.junit.SupportFilesSetup.setUp(SupportFilesSetup.java:120)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
</failure>
  </testcase>


      was (Author: dibyendumajumdar):
    Revised patch - created at revision 630512.

Patch was created using Mercurial. See comments above for details on how to apply either using patch command or using Eclipse.
  
> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571698#action_12571698 ] 

Daniel John Debrunner commented on DERBY-3451:
----------------------------------------------

FYI on the patch format, I can get it to apply  almost (I use Eclipse) but require an extra step. Doing nothing the patch appears to be against files
   
   a/java/...

so I can ignore 1 segment in the file and then it seems ok, though this patch did not apply cleanly, not sure if it depends on another patch or not.

svn diff produces the expected format for patches. That format also includes the revision the patch is against, which allows anyone applying the patch to set their codeline to the same revision if they have problems applying it.

I would recommend using svn diff to make it easier for committers (and others) to try out & commit patches.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Resolved: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar resolved DERBY-3451.
--------------------------------------

    Resolution: Fixed

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572013#action_12572013 ] 

Daniel John Debrunner commented on DERBY-3451:
----------------------------------------------

I'm looking at committing this patch, I'll fix up the class name in the header in DerbySQLException.java (it has a different class name there).

Just FYI - I think a longer term goal would be to remove EmbedSQLException and now DerbySQLException and instead just use java.sql.SQLException.
JDBC 4 tends to lead in that direction because it has a number of sub-classes for SQLException and I think it would be the wrong approach for Derby
to have an Embed version for every SQLException sub-class. The main reason originally for EmbedSQLException originally was to be able to
keep the original non-SQLException (e.g. StandardException, IOException), which is (should be?) now handled by Throwable.initClause().

Throwing a non-java library exception causes some issues for JMX as the exception can not be transfered to the client.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Daniel John Debrunner updated DERBY-3451:
-----------------------------------------

    Derby Info:   (was: [Patch Available])

Patch applied - Revision: 630903

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Issue Comment Edited: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571655#action_12571655 ] 

dibyendumajumdar edited comment on DERBY-3451 at 2/22/08 4:20 PM:
-------------------------------------------------------------------

Hi Kathey,

I tried running the junit-all tests on CentOS 5.1, but they fail immediately with security exceptions (same errors as reported by you in  DERBY-2667). I am running the junit-all tests on Mac O X using Java 1.5, and will record the test results once they complete.

      was (Author: dibyendumajumdar):
    Hi Kathy,

I tried running the junit-all tests on CentOS 5.1, but they fail immediately with security exceptions (same errors as reported by you in  DERBY-2667). I am running the junit-all tests on Mac O X using Java 1.5, and will record the test results once they complete.
  
> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Description: 
In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
org.apache.derby.impl.jdbc.Util
org.apache.derby.impl.jdbc.EmbedSQLException

This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.


  was:
In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
org.apache.derby.impl.jdbc.Util
org.apache.derby.impl.jdbc.EmbedSQLException

This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

To remove this dependency, following changes have been made.

A new interface called DerbySQLException has been added to org.apache.derby.iapi.error.
The EmbedSQLException class has been modified to implement this interface.
The StandardException calls the isSimpleWrapper method on the DerbySQLException interface, thereby avoiding a need to reference EmbedSQLException.

A new static method getArgumentFerry() has been added to StandardExcepion. This performs the same task as the current getArgumentFerry() method in SQLExceptionFactory and SQLExceptionFactory40.
SQLExceptionFactory.getArgumentFerry() has been amended to call StandardException.getArgumentFerry().
SQLExceptionFactory40.getArgumentFerry() has been removed.
StandardException.getArgumentFerry() now handles the pre-JDBC3 and post-JDBC4 scenarios (in the pre-JDBC4 scenario, the passed argument is a DerbySQLException, which is returned immediately), so there is no need to override this functionality.

This change allows us to avoid having a dependency between StandardException and Util.
As the getArgumentFerry() method now checks for DerbySQLException rather than EmbedSQLException, it is able to avoid dependency on EmbedSQLException.


> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Myrna van Lunteren updated DERBY-3451:
--------------------------------------

    Fix Version/s: 10.4.1.3

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>             Fix For: 10.4.1.3
>
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Issue Comment Edited: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571830#action_12571830 ] 

dibyendumajumdar edited comment on DERBY-3451 at 2/23/08 6:07 PM:
-------------------------------------------------------------------

Revised patch - created at revision 630512.

Patch was created using Mercurial. See comments above for details on how to apply either using patch command or using Eclipse.

      was (Author: dibyendumajumdar):
    Revised patch - created at revision 630512.

Patch was created using Mercurial. See comments for details on how to apply either suing patch command or using Eclipse.
  
> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Attachment: DERBY-3451_patch_rev630512.txt

Revised patch - created at revision 630512.

Patch was created using Mercurial. See comments for details on how to apply either suing patch command or using Eclipse.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Dibyendu Majumdar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571655#action_12571655 ] 

Dibyendu Majumdar commented on DERBY-3451:
------------------------------------------

Hi Kathy,

I tried running the junit-all tests on CentOS 5.1, but they fail immediately with security exceptions (same errors as reported by you in  DERBY-2667). I am running the junit-all tests on Mac O X using Java 1.5, and will record the test results once they complete.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571646#action_12571646 ] 

Kathey Marsden commented on DERBY-3451:
---------------------------------------

There are also the JUnit tests run by the suite suites.All. See java/testing/README.htm for details.


> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Kathey Marsden updated DERBY-3451:
----------------------------------

    Component/s: JDBC

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Updated: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Attachment: DERBY-3451_patch_1.txt

To remove this dependency, following changes have been made. 

A new interface called DerbySQLException has been added to org.apache.derby.iapi.error. 
The EmbedSQLException class has been modified to implement this interface. 
The StandardException calls the isSimpleWrapper method on the DerbySQLException interface, thereby avoiding a need to reference EmbedSQLException. 

A new static method getArgumentFerry() has been added to StandardExcepion. This performs the same task as the current getArgumentFerry() method in SQLExceptionFactory and SQLExceptionFactory40. 
SQLExceptionFactory.getArgumentFerry() has been amended to call StandardException.getArgumentFerry(). 
SQLExceptionFactory40.getArgumentFerry() has been removed. 
StandardException.getArgumentFerry() now handles the pre-JDBC3 and post-JDBC4 scenarios (in the pre-JDBC4 scenario, the passed argument is a DerbySQLException, which is returned immediately), so there is no need to override this functionality. 

This change allows us to avoid having a dependency between StandardException and Util. 
As the getArgumentFerry() method now checks for DerbySQLException rather than EmbedSQLException, it is able to avoid dependency on EmbedSQLException.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_1.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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


[jira] Commented: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

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

Kristian Waagan commented on DERBY-3451:
----------------------------------------

BTW, I ran the regression tests with the patch applied. No failures in my runs for Sun JDK 1.4.2 and 1.6.0.

> Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3451
>                 URL: https://issues.apache.org/jira/browse/DERBY-3451
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Dibyendu Majumdar
>            Assignee: Dibyendu Majumdar
>         Attachments: DERBY-3451_patch_rev630512.txt
>
>
> In the package org.apache.derby.iapi.error, the class StandardException contains references to following classes:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException and the implementation of EmbedSQLException.

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