Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.0.1
-
None
-
None
Description
Sometimes while running Kafka server inside tests of an upstream application it can happen that the server cannot start due to a bad runtime error, like a missing jar on the classpath.
I would like KafkaServerStartable to log any 'Throwable' in order to catch these unpredictable errors
like this
java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonMerge at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:50) at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:291) at kafka.utils.Json$.<init>(Json.scala:29) at kafka.utils.Json$.<clinit>(Json.scala) at kafka.utils.ZkUtils$ClusterId$.toJson(ZkUtils.scala:299) at kafka.utils.ZkUtils.createOrGetClusterId(ZkUtils.scala:314) at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356) at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356) at scala.Option.getOrElse(Option.scala:121) at kafka.server.KafkaServer.getOrGenerateClusterId(KafkaServer.scala:356) at kafka.server.KafkaServer.startup(KafkaServer.scala:197) at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38) at magnews.datastream.server.DataStreamServer.start(DataStreamServer.java:96) at magnews.datastream.server.RealServerSinglePartitionTest.test(RealServerSinglePartitionTest.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
Attachments
Issue Links
- links to