[ https://issues.apache.org/jira/browse/KAFKA-6757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16428078#comment-16428078 ]
ASF GitHub Bot commented on KAFKA-6757: --------------------------------------- eolivelli opened a new pull request #4833: KAFKA-6757 Log runtime exception in case of server startup errors URL: https://github.com/apache/kafka/pull/4833 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, see KAFKA-6757 for examples . I would like KafkaServerStartable to log any 'Throwable' in order to catch this unpredictable error Testing strategy: no test case is needed or it is worth to add ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Log runtime exception in case of server startup errors > ------------------------------------------------------ > > Key: KAFKA-6757 > URL: https://issues.apache.org/jira/browse/KAFKA-6757 > Project: Kafka > Issue Type: Improvement > Components: log > Affects Versions: 1.0.1 > Reporter: Enrico Olivelli > Priority: Minor > > 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 > this unpredictable errors > > like this > {code:java} > 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){code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)