[ https://issues.apache.org/jira/browse/LOG4J2-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898890#comment-15898890 ]
ASF subversion and git services commented on LOG4J2-1839: --------------------------------------------------------- Commit d5b5df4dc9a314a2a48cd14223ac9007b4260273 in logging-log4j2's branch refs/heads/master from ggregory [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=d5b5df4 ] Refactor existing test before playing with [LOG4J2-1839] > JdbcAppender.createAppender deprecated > -------------------------------------- > > Key: LOG4J2-1839 > URL: https://issues.apache.org/jira/browse/LOG4J2-1839 > Project: Log4j 2 > Issue Type: Improvement > Components: Appenders > Affects Versions: 2.8.1 > Reporter: Krzysztof Szymko > Fix For: 2.8.2 > > > As I was migrating 2.7 to 2.8.1 I followed JdbcAppender.<B>newBuilder() API > to build JDBC appender: > return JdbcAppender.<B>newBuilder() > .setBufferSize(bufferSizeInt) > .setColumnConfigs(columnConfigs) > .setConnectionSource(connectionSource) > .setTableName(tableName) > .withName(name) > .withIgnoreExceptions(ignoreExceptions) > .withFilter(filter) > .build(); > But then I got NPE from JdbcDatabaseManagerFactory @ 275, since > I did not set any columnMappings. After providing > .setColumnMappings(columnMappingJDBC) > to my builder it worked OK. I would suggest to either improve the javadoc or > add NULL check in JdbcDatabaseManagerFactory.createManager > as JdbcAppender javadoc says that ColumnMapping is optional: > This Appender writes logging events to a relational database using standard > JDBC mechanisms. It takes a list of > * {@link ColumnConfig}s and/or {@link ColumnMapping}s with -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org