QOS.ch JIRA

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • logback-classic
  • LBCLASSIC-239

DBAppender swallow NullPointerException

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.9.27
  • Fix Version/s: 0.9.28
  • Component/s: appender
  • Labels:
    None

Description

logback.xml :

<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
    <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
    <dataSource class ="com.mchange.v2.c3p0.ComboPooledDataSource"></dataSource>
        <driverClass>com.mysql.jdbc.Driver</driverClass>
        <url>jdbc:mysql://localhost:3306/mrb&lt;/url>
        <user>root</user>
        <password>admin</password>
    </connectionSource>
</appender>

Java code (using DBAppender):

Date dateFrom = null;
log.info("Processing code {}; code type is {}; request date {}; record from date {}",new Object[] { code, codeType, new Date(), dateFrom });

DBAppender had null pointer exception on 141 line because of dateFrom, but this exception is swallowed and not shown.

Activity

  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Ceki Gulcu added a comment - 30/Dec/10 5:06 PM
Fixed in http://github.com/ceki/logback/commit/b8790fc09e
Show
Ceki Gulcu added a comment - 30/Dec/10 5:06 PM Fixed in http://github.com/ceki/logback/commit/b8790fc09e

People

  • Assignee:
    Ceki Gulcu
    Reporter:
    Artyom Kalita
Vote (0)
Watch (0)

Dates

  • Created:
    27/Dec/10 1:55 PM
    Updated:
    30/Dec/10 5:06 PM
    Resolved:
    30/Dec/10 5:06 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for logback. Try JIRA - bug tracking software for your team.