Hi, I think you will get better help if you provide a reproducible JUnit test case or program, on GitHub for example.
Whenever you mention an Error or Exception, you should copy it in your message. Gary On Fri, Oct 6, 2017 at 8:48 AM, gaurav9...@gmail.com <gaurav9...@gmail.com> wrote: > Hi log4j2 users, > > I have created a MapMessage with a key-value pair > > e.g. userName="log4j" > > I have configured JDBCAppender with > > <Column name="userName" pattern="%K{userName}"/> > > But, it gives null pointer error when tried to insert into database table > using %K/%map/%MAP > and works when you put normal message/literal string. > > Note: > 'userName' is same for Column-name, pattern and MapMessage-key as well. > Using log4j version 2.9.0 > > Please help, > > Thanks, > Gaurav > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > >