简体   繁体   中英

How to resolve the error: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: io/vertx/core/Promise

i have created a maven project where i wrote code for kafka consumer to retrieve the messages from kafka server. i am using vertx framework with vertx-kafka-client dependency. According to vertx kafka docs ( https://vertx.io/docs/vertx-kafka-client/java/#_using_the_vert_x_kafka_client ), i have setup the code and while running the program i am getting error as java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: io/vertx/core/Promise

The solution to this error is

  • Right-click on your project
  • Go to Maven -> Update Project
  • After update, Run the program

when we import projects to IDE, sometimes we forget to update the project and directly running it will cause the error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM