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 "Sunitha Kambhampati (JIRA)" <de...@db.apache.org> on 2006/03/16 00:25:58 UTC

[jira] Created: (DERBY-1117) SQLException can lose stacktrace in some cases.

SQLException can lose  stacktrace in some cases.
------------------------------------------------

         Key: DERBY-1117
         URL: http://issues.apache.org/jira/browse/DERBY-1117
     Project: Derby
        Type: Bug
  Components: Network Client  
    Versions: 10.2.0.0    
    Reporter: Sunitha Kambhampati
    Priority: Minor
     Fix For: 10.2.0.0


cause is being lost in the following constructor in SqlException

   public SqlException(LogWriter logwriter,
       MessageId msgid, Object[] args, Throwable cause)
   {
       this(
           logwriter,
           msgutil_.getCompleteMessage(
               msgid.msgid,
               args),
           ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
           ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
   }

maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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-1117) SQLException can lose stacktrace in some cases.

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

David Van Couvering commented on DERBY-1117:
--------------------------------------------

Do you happen to have a testcase for this already available?  If not, I can write one.

Thanks,

David

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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-1117) SQLException can lose stacktrace in some cases.

Posted by "Suresh Thalamati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1117?page=comments#action_12413955 ] 

Suresh Thalamati commented on DERBY-1117:
-----------------------------------------

SqlExceptionTest.junit. added as part of this fix is failing when  derbyall is run on an ibm13 jvm; looks like this test should not be run with 13 jvms. 
it is already been diabled for jdk13,  can some one with commit access disable this for ibm13 jvm too please.

By looking at the other test , looks likle following flag has to be added to SqlExceptionTest_app.properties:
runwithibm13=false


Thanks
-suresh


> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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-1117) SQLException can lose stacktrace in some cases.

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


Closing this issue.  

The below checkin solves the SqlExceptionTest failure with ibm131 jvms.  Thanks Suresh and David.
------------------------------
Author: suresht
Date: Fri Jun  9 14:37:29 2006
New Revision: 413174

URL: http://svn.apache.org/viewvc?rev=413174&view=rev
Log:
Exclude SqlExceptionTest from ibm13 jvm test runs.
---------------------------------

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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-1117) SQLException can lose stacktrace in some cases.

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1117?page=all ]
     
David Van Couvering resolved DERBY-1117:
----------------------------------------

    Resolution: Fixed

Submitted, revision 386710.  Includes a new test that verifies chaining works correctly, both with getCause() and getNextException().  The rule is SQLExceptions get added to getNextException(), other exceptions are added to as the initial cause.  The test failed prior to fix, passes now.  Added this test to the derbynetclientmats suite.

I used the junit framework, works nicely, I was able to whip up a test very quickly!

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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


Re: [jira] Commented: (DERBY-1117) SQLException can lose stacktrace in some cases.

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
OK, that didn't work.  I think I need to devise a separate test.  Maybe 
I'll just call the EncryptionManager constructor directly :)

David

Sunitha Kambhampati (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-1117?page=comments#action_12370630 ] 
> 
> Sunitha Kambhampati commented on DERBY-1117:
> --------------------------------------------
> 
> Hi David,  I dont have a testcase available, but I found this when I was debugging when I was doing some other fix.  
> The codepath which lead to this was an exception in org.apache.derby.client.am.EncryptionManager.constructor. 
> 
> But maybe if you run the derbynet/testSecMec.java test in DerbyNetClient framework,  with your change, the master file may change..(?).
> 
> Thanks. 
> 
> 
>>SQLException can lose  stacktrace in some cases.
>>------------------------------------------------
>>
>>         Key: DERBY-1117
>>         URL: http://issues.apache.org/jira/browse/DERBY-1117
>>     Project: Derby
>>        Type: Bug
>>  Components: Network Client
>>    Versions: 10.2.0.0
>>    Reporter: Sunitha Kambhampati
>>    Assignee: David Van Couvering
>>    Priority: Minor
>>     Fix For: 10.2.0.0
> 
> 
>>cause is being lost in the following constructor in SqlException
>>   public SqlException(LogWriter logwriter,
>>       MessageId msgid, Object[] args, Throwable cause)
>>   {
>>       this(
>>           logwriter,
>>           msgutil_.getCompleteMessage(
>>               msgid.msgid,
>>               args),
>>           ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>>           ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>>   }
>>maybe we should add setThrowable(cause) so we dont lose track of it.  
> 
> 

[jira] Commented: (DERBY-1117) SQLException can lose stacktrace in some cases.

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1117?page=comments#action_12370630 ] 

Sunitha Kambhampati commented on DERBY-1117:
--------------------------------------------

Hi David,  I dont have a testcase available, but I found this when I was debugging when I was doing some other fix.  
The codepath which lead to this was an exception in org.apache.derby.client.am.EncryptionManager.constructor. 

But maybe if you run the derbynet/testSecMec.java test in DerbyNetClient framework,  with your change, the master file may change..(?).

Thanks. 

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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] Assigned: (DERBY-1117) SQLException can lose stacktrace in some cases.

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

David Van Couvering reassigned DERBY-1117:
------------------------------------------

    Assign To: David Van Couvering

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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-1117) SQLException can lose stacktrace in some cases.

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

David Van Couvering commented on DERBY-1117:
--------------------------------------------

I could fix this, but wouldn't be able to test this as I don't have the IBM 13 VM.  I suggest someone with access to this VM should make this change and test it.

> SQLException can lose  stacktrace in some cases.
> ------------------------------------------------
>
>          Key: DERBY-1117
>          URL: http://issues.apache.org/jira/browse/DERBY-1117
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.2.0.0
>     Reporter: Sunitha Kambhampati
>     Assignee: David Van Couvering
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> cause is being lost in the following constructor in SqlException
>    public SqlException(LogWriter logwriter,
>        MessageId msgid, Object[] args, Throwable cause)
>    {
>        this(
>            logwriter,
>            msgutil_.getCompleteMessage(
>                msgid.msgid,
>                args),
>            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
>            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
>    }
> maybe we should add setThrowable(cause) so we dont lose track of it.  

-- 
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