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 "Andrew McIntyre (JIRA)" <de...@db.apache.org> on 2006/08/02 03:55:14 UTC

[jira] Created: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
---------------------------------------------------------------------------

                 Key: DERBY-1630
                 URL: http://issues.apache.org/jira/browse/DERBY-1630
             Project: Derby
          Issue Type: Bug
          Components: Network Client
    Affects Versions: 10.2.0.0
            Reporter: Andrew McIntyre
             Fix For: 10.2.0.0


NetConnection40.java contains this:

...
import org.apache.derby.impl.jdbc.Util;
...
   public boolean isValid(int timeout) throws SQLException {
       // Validate that the timeout has a legal value
       if (timeout < 0) {
           throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
                                             new Integer(timeout), "timeout",
                                             "java.sql.Connection.isValid");
       }
...

This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre updated DERBY-1630:
-----------------------------------

    Attachment: derby-1630-v1.diff

Attaching a patch for this issue that replaces the call to org.apache.derby.impl.jdbc.Util by throwing a new SQLException generated via org.apache.derby.client.am.SqlException. The patch passed the jdbc4/TestConnectionMethods test.

Please review the patch and let me know if you see any problems. I thought of making this a SQLNonTransientException, but I wasn't sure if the subclassification was necessary here.

Because this is blocking DERBY-1424, I would like to get this committed soon. If there are no objections, I will commit this patch some time tomorrow, or a reviewer could commit it in the interim if they feel it is acceptable.

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre closed DERBY-1630.
----------------------------------


> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff, derby-1630-v2.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre resolved DERBY-1630.
------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

Commited to trunk with revision 428065.

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff, derby-1630-v2.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre updated DERBY-1630:
-----------------------------------

    Attachment: derby-1630-v2.diff

Attaching a revision that uses the SqlException constructor that takes three Object methods. This patch also passes jdbc4/TestConnectionMethods.

I will commit this patch shortly if there are no further comments.

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff, derby-1630-v2.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1630?page=comments#action_12425129 ] 
            
David Van Couvering commented on DERBY-1630:
--------------------------------------------

Your patch looks good, although I think there is a helper method in SqlException that takes three Objects, so you don't need to create the object array.

And you don't need to specify a SQLException subclass here, that happens by magic in the getSQLException() logic, as determined by the SQL State.

David

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre updated DERBY-1630:
-----------------------------------

      Assignee: Andrew McIntyre
    Derby Info: [Patch Available]

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1630?page=comments#action_12425267 ] 
            
Rick Hillegas commented on DERBY-1630:
--------------------------------------

The patch looks good to me. It follows the standard pattern for creating SQLExceptions in the network client.

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff, derby-1630-v2.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1630?page=all ]

Andrew McIntyre updated DERBY-1630:
-----------------------------------

    Priority: Critical  (was: Major)

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1630) NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1630?page=comments#action_12425135 ] 
            
Andrew McIntyre commented on DERBY-1630:
----------------------------------------

s/three Object methods/three Objects/

:-)

> NetConnection40 references an engine class, org.apache.derby.impl.jdbc.Util
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-1630
>                 URL: http://issues.apache.org/jira/browse/DERBY-1630
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.0.0
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1630-v1.diff, derby-1630-v2.diff
>
>
> NetConnection40.java contains this:
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), "timeout",
>                                              "java.sql.Connection.isValid");
>        }
> ...
> This was added as part of DERBY-1090. This should be changed to use the client's method of throwing exceptions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira