[ 
https://issues.apache.org/jira/browse/KAFKA-15110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735644#comment-17735644
 ] 

hudeqi commented on KAFKA-15110:
--------------------------------

Leave an exception log so that others can find this problem:

 

[2023-06-21 18:00:59,186] INFO Metrics reporters closed 
(org.apache.kafka.common.metrics.Metrics)
[2023-06-21 18:00:59,188] INFO Broker and topic stats closed 
(kafka.server.BrokerTopicStats)
[2023-06-21 18:00:59,190] INFO App info kafka.server for 0 unregistered 
(org.apache.kafka.common.utils.AppInfoParser)
[2023-06-21 18:00:59,190] INFO [KafkaServer id=0] shut down completed 
(kafka.server.KafkaServer)
[2023-06-21 18:00:59,190] ERROR Exiting Kafka due to fatal exception during 
startup. (kafka.Kafka$)
java.lang.NoSuchMethodError: 'void 
org.apache.kafka.storage.internals.log.ProducerStateManagerConfig.<init>(int)'
        at kafka.log.LogManager$.apply(LogManager.scala:1394)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:279)
        at kafka.Kafka$.main(Kafka.scala:113)
        at kafka.Kafka.main(Kafka.scala)
[2023-06-21 18:00:59,190] INFO [KafkaServer id=0] shutting down 
(kafka.server.KafkaServer)

> Wrong version may be run, which will cause to fail to run when there are 
> multiple version jars under core/build/libs
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-15110
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15110
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.4.1
>            Reporter: hudeqi
>            Assignee: hudeqi
>            Priority: Major
>         Attachments: WechatIMG28.jpeg, WechatIMG29.jpeg
>
>
> For example, when I build a jar through './gradlew jar' under a 3.5.0 branch, 
> and then switch to a 3.6.0 branch, a jar is also built. Since 
> "core/build/libs" is a  "gitignore dir", there will be two versions of 
> packages in this directory. At this time, when I start the kafka process 
> under the local bin dir, I will encounter the problem that it cannot be 
> started because the version is running incorrectly.
> The reason is that /kafka-run-class.sh transfers all jar packages to 
> CLASSPATH by default, which is an unreasonable behavior.
> For details, see the attached screenshot below:
> Figure 1 shows that the abnormal exit because of the missing of 
> ProducerStateManagerConfig(int xx) method, which is defined in version 3.5.0, 
> but the initial method of ProducerStateManagerConfig in version 3.6.0 has two 
> parameters.
> Figure 2 is the printed value of CLASSPATH.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to