Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-19 Thread Bill Okara
lector. If > you really want a common configuration across all your web apps then you can > use the BasicContextSelector. However, that may cause problems if you try to > use hot deployment. > > Ralph > > >> On Aug 19, 2016, at 1:52 PM, Bill Okara wrote: >> >> Hi Gary,

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-19 Thread Bill Okara
sorry Ralph, the last reply was for you (didn't read the sender carefully) On Fri, Aug 19, 2016 at 2:52 PM, Bill Okara wrote: > Hi Gary, > > actually the full stack was attached in that email already, please let > me know if you can't find them... > (Attachments: st

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-19 Thread Bill Okara
rt. > > However, I would really like to see the stack frames just below where you > stopped to see what is causing the initial Log4j initialization. > > Ralph > > > >> On Aug 19, 2016, at 11:17 AM, Bill Okara wrote: >> >> thanks for guiding me through th

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-19 Thread Bill Okara
oducer", > t); > } > > This line 333 in the latest client. > > Then you can dump the exception on the console and tell us what it is > because we are not seeing it in the log since the close method causes its > own NPE. > > Finding what the Throwable is

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-19 Thread Bill Okara
od causes its > own NPE. > > Finding what the Throwable is will be a lot. > > Gary > > On Thu, Aug 18, 2016 at 11:30 PM, Bill Okara wrote: > >> Thanks, Gary, >> >> you're probably right, the log in log.info seems to be the culprit. >> >>

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-18 Thread Bill Okara
o("Closing the Kafka producer with timeoutMillis = {} ms.", > timeUnit.toMillis(timeout)); > > It does not look like timeUnit can be null, so it must be log. > > The root problem of course if that we have an exception thrown in the > KafkaProducer > ctor. > > Gary >

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-18 Thread Bill Okara
tried again, seemed like the .out extension got filtered out by mail server... On Thu, Aug 18, 2016 at 4:41 PM, Bill Okara wrote: > attach the catalina.out again, didn't seem to go through last time... > > > On Thu, Aug 18, 2016 at 4:33 PM, Bill Okara wrote: >> Hi, &g

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-18 Thread Bill Okara
attach the catalina.out again, didn't seem to go through last time... On Thu, Aug 18, 2016 at 4:33 PM, Bill Okara wrote: > Hi, > > When trying out the log4j2 Kafka appender, it works ok if all the > log4j2/kafka-client related jars are packaged in the webapp's > WEB-

Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-08-18 Thread Bill Okara
Hi, When trying out the log4j2 Kafka appender, it works ok if all the log4j2/kafka-client related jars are packaged in the webapp's WEB-INF/lib, like: >ls WEB-INF/lib/ jackson-core-2.8.1.jar log4j-core-2.6.2.jar lz4-1.3.0.jar kafka-clients-0.10.0.1.jar log4j-slf4j-impl-2.6.2.jar slf4j-api-1.7.21.

Re: is it possible to set container shared lib to use custom loggerContext

2016-07-26 Thread Bill Okara
ogger to live in a separate context > from your application. I wouldn't like hard-coding this in my library > though... > > Your current solution allows most flexibility imho. > > Remko > > Sent from my iPhone > >> On 2016/07/26, at 3:56, Bill Okara wrote: &

Re: is it possible to set container shared lib to use custom loggerContext

2016-07-25 Thread Bill Okara
ations > for both web apps to create a separate appender (and a separate log file) > for the loggers for that package. > > Remko > > On Sat, Jul 23, 2016 at 3:18 AM, Bill Okara wrote: > >> Hi, >> >> Following is my deployment env: >> >> tomcat7 &g

Fwd: is it possible to set container shared lib to use custom loggerContext

2016-07-22 Thread Bill Okara
Hi, Following is my deployment env: tomcat7 |- lib/sharedLib12.jar // shared lib used by webapp1 and webapp2 |- lib/slf4j-api-1.7.7.jar, log4j-api-2.3.jar, log4j-core-2.3.jar, log4j-slf4j-impl-2.3.jar | |- webapps |-webapp1/WEB-INF/classes/log4j2.xml |