db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1191) Some SQLExceptions, for example those generated from BrokeredStatements, do not print to derby.log even when derby.stream.error.logSeverityLevel=0
Date Wed, 05 Aug 2009 20:29:14 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739725#action_12739725
] 

Myrna van Lunteren commented on DERBY-1191:
-------------------------------------------

I would worry about making a large code change in older branches. But it does seem - without
actually looking at the code - that the second suggestion is clearer in the way the process
flows.
It seems to me, could you do both - do approach 1 for older releases (10.4 and earlier) and
approach 2 for trunk (and 10.5?) or would that be too much work and cause too much pain backporting
fixes? 


> Some SQLExceptions, for example those generated from BrokeredStatements,  do not print
to derby.log even  when  derby.stream.error.logSeverityLevel=0
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1191
>                 URL: https://issues.apache.org/jira/browse/DERBY-1191
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1, 10.2.1.6
>            Reporter: Kathey Marsden
>         Attachments: ReproDerby1191.java
>
>
> I found this when working on DERBY-1047.   Exceptions thrown  using 
> org.apache.derby.impl.jdbc.Util.generateCsSQLException()
> do not print to derby.log even when derby.stream.error.logSeverityLevel=0
> For example the attached repro  generates an expected exception but does not  print the
error to the log.
> java -Dderby.stream.error.logSeverityLevel=0 Derby1047
> This causes an expected exception to be thrown but it does not print to the derby.log
> 10.2.0.0 alpha
> Apache Derby
> Apache Derby Embedded JDBC Driver
> done creating  table
> COL1
> -----------
> 1
> 2
> PASS: Expected Exception can'tholdable cusror in global xact:Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT
for a global transaction.
> COL1
> -----------
> 1
> 2
> 3
> The code generating the exception is in org.apache.derby.iapi.jdbc.BrokeredStatement
>   final void checkHoldability() throws SQLException {
>         int holdability = controlCheck().checkHoldCursors(resultSetHoldability);
>         if (holdability != resultSetHoldability)
>             throw Util.generateCsSQLException(SQLState.CANNOT_HOLD_CURSOR_XA);
>     }

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


Mime
View raw message