|
|
-
Could not initialize class kafka.utils.Log4jController$ ?
Jason Huang 2012-12-21, 15:59
Hello,
I am writing a simple java client that uses SimpleConsumer to fetch messages from a Kafka Server:
.................. KafkaConnectionParams connection = new KafkaConnectionParams(); SimpleConsumer consumer = new SimpleConsumer(connection.getKafkaServerURL(), connection.getKafkaServerPort(), connection.getConnectionTimeOut(), connection.getKafkaProducerBufferSize()); FetchRequest req = new FetchRequest(topic, partition, offset, maxSize); ...................
I deployed the code to a JBoss Application Server running in my local laptop. However, a runtime exception is thrown for the code above:
SimpleConsumer.<init>(String, int, int, int) line: 31 Logging$class.$init$(Logging) line: 23 -- kafka.utils.Logging Class<T>.getName() line: 551 [local variables unavailable] SimpleConsumer.kafka$utils$Logging$_setter_$loggerName_$eq(String) line: 31 Logging$class.$init$(Logging) line: 26 SimpleConsumer.logIdent_$eq(String) line: 31 Logging$class.$init$(Logging) line: 29 --- this appears to be the code below (// Force initialization to register Log4jControllerMBean private val log4jController = Log4jController)
InvocationTargetException.<init>(Throwable) line: 54 (detail message = "Could not initialize class kafka.utils.Log4jController$")
I am not exactly sure where the issue is. It looks like I am able to initialize other classes in the kafka.utils package. Both kafka-0.7.2.jar and log4j-1.2.13.jar are in my Maven repository.
Any help will be greatly appreciated!
thanks!
Jason
-
Re: Could not initialize class kafka.utils.Log4jController$ ?
Jason Huang 2012-12-21, 16:26
After thinking about this a bit more, I feel like this may be related to my JBoss log4j setting. I will try to run it locally (without JBoss) and see if I can get messages from the Kafka Server.
However, any thoughts will be greatly appreciated!
thanks,
Jason
On Fri, Dec 21, 2012 at 10:59 AM, Jason Huang <[EMAIL PROTECTED]> wrote: > Hello, > > I am writing a simple java client that uses SimpleConsumer to fetch > messages from a Kafka Server: > > .................. > KafkaConnectionParams connection = new KafkaConnectionParams(); > SimpleConsumer consumer = new SimpleConsumer(connection.getKafkaServerURL(), > > connection.getKafkaServerPort(), > > connection.getConnectionTimeOut(), > > connection.getKafkaProducerBufferSize()); > > FetchRequest req = new FetchRequest(topic, partition, offset, maxSize); > ................... > > I deployed the code to a JBoss Application Server running in my local > laptop. However, a runtime exception is thrown for the code above: > > SimpleConsumer.<init>(String, int, int, int) line: 31 > Logging$class.$init$(Logging) line: 23 -- kafka.utils.Logging > Class<T>.getName() line: 551 [local variables unavailable] > SimpleConsumer.kafka$utils$Logging$_setter_$loggerName_$eq(String) line: 31 > Logging$class.$init$(Logging) line: 26 > SimpleConsumer.logIdent_$eq(String) line: 31 > Logging$class.$init$(Logging) line: 29 --- this appears to be > the code below > (// Force initialization to register Log4jControllerMBean > private val log4jController = Log4jController) > > InvocationTargetException.<init>(Throwable) line: 54 > (detail message = "Could not initialize class kafka.utils.Log4jController$") > > I am not exactly sure where the issue is. It looks like I am able to > initialize other classes in the kafka.utils package. Both > kafka-0.7.2.jar and log4j-1.2.13.jar are in my Maven repository. > > Any help will be greatly appreciated! > > thanks! > > Jason
|
|