[logback-dev] [JIRA] Commented: (LBCLASSIC-249) Logging Exceptions using DBAppender fails (at least on Oracle), when message or stack frame is longer than 254 bytes

Marc Breitenreicher (JIRA) noreply-jira at qos.ch
Tue Feb 7 16:34:26 CET 2012


    [ http://jira.qos.ch/browse/LBCLASSIC-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12357#action_12357 ] 

Marc Breitenreicher commented on LBCLASSIC-249:
-----------------------------------------------

Same problem with IBM DB2, is not just Oracle specifc.

> Logging Exceptions using DBAppender fails (at least on Oracle), when message or stack frame is longer than 254 bytes
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-249
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-249
>             Project: logback-classic
>          Issue Type: Bug
>          Components: appender
>    Affects Versions: 0.9.28
>         Environment: Oracle DBMS
>            Reporter: Andreas Zielke
>            Assignee: Logback dev list
>            Priority: Minor
>
> Sometimes the DBAppender failed to log Exceptions, so I checked the status of the StatusManager and found the folloging problem:
>  java.sql.BatchUpdateException: ORA-12899: Wert zu groß für Spalte "SUBSYSTEMTEST"."LOGGING_EVENT_EXCEPTION"."TRACE_LINE" (aktuell: 692, maximal: 254)
> Possible fix:
> After reading the code of DBAppender I subclassed it and changed the code of the method
> void updateExceptionStatement(PreparedStatement exceptionStatement, String txt, short i, long eventId)
> so that the text would be shortened accordingly. 
> This seems to be the most consistent workaround, as many other columns are also only 254 bytes wide.
> I'd much rather have a wider column and not loose information, though. (This would be consistent with the changes to LOGGING_EVENT_EXCEPTION as proposed in LBCLASSIC-170).

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

       


More information about the logback-dev mailing list