spring-cloud / spring-cloud-schema-registry

A schema registry implementation for Spring Cloud Stream
47 stars 27 forks source link

Method not found. void org.springframework.messaging.converter.AbstractMessageConverter.<init>(org.springframework.util.MimeType[]) #46

Open Enkuushka opened 4 years ago

Enkuushka commented 4 years ago

Hi I am trying to run examples at spring-cloud-stream-samples. Specifically the schema-registry-samples/schema-registry-vanilla-kafka-binder sub-project.

But when I try to run the either of the 3 projects in it. It is not running due to the following message. java.lang.NoClassDefFoundError: org/springframework/messaging/converter/MessageConverter

Full stack trace is:

 :: Spring Boot ::        (v2.2.1.RELEASE)

2020-09-07 11:43:05.005  INFO 3250 --- [           main] sample.consumer.ConsumerApplication      : Starting ConsumerApplication on pop-os with PID 3250 (/home/enkhbold/Documents/study/spring-cloud-stream-samples/schema-registry-samples/schema-registry-vanilla-kafka-binder/schema-registry-vanilla-consumer-kafka/target/classes started by enkhbold in /home/enkhbold/Documents/study/spring-cloud-stream-samples/schema-registry-samples)
2020-09-07 11:43:05.007  INFO 3250 --- [           main] sample.consumer.ConsumerApplication      : No active profile set, falling back to default profiles: default
2020-09-07 11:43:05.347  INFO 3250 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2020-09-07 11:43:05.349  INFO 3250 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2020-09-07 11:43:05.352  INFO 3250 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2020-09-07 11:43:05.370  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.373  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration' of type [org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.376  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.379  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.386  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationChannelResolver' of type [org.springframework.integration.support.channel.BeanFactoryChannelResolver] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.387  INFO 3250 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationDisposableAutoCreatedBeans' of type [org.springframework.integration.config.annotation.Disposables] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-07 11:43:05.542  INFO 3250 --- [           main] AvroSchemaRegistryClientMessageConverter : Scanning avro schema resources on classpath
2020-09-07 11:43:05.542  INFO 3250 --- [           main] AvroSchemaRegistryClientMessageConverter : Parsing 0 schemas
2020-09-07 11:43:05.579  INFO 3250 --- [           main] AvroSchemaRegistryClientMessageConverter : Resource sensor.avsc parsed into schema com.example.Sensor
2020-09-07 11:43:05.627  INFO 3250 --- [           main] AvroSchemaRegistryClientMessageConverter : Schema Sensor registered with id {"type":"record","name":"Sensor","namespace":"com.example","fields":[{"name":"id","type":"string"},{"name":"internalTemperature","type":"float","default":0.0,"aliases":["temperature"]},{"name":"externalTemperature","type":"float","default":0.0},{"name":"acceleration","type":"float","default":0.0},{"name":"velocity","type":"float","default":0.0}]}
2020-09-07 11:43:05.636  WARN 3250 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.FunctionRegistry]: Factory method 'functionCatalog' threw exception; nested exception is java.lang.NoSuchMethodError: 'void org.springframework.messaging.converter.AbstractMessageConverter.<init>(org.springframework.util.MimeType[])'
2020-09-07 11:43:05.642  INFO 3250 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-09-07 11:43:05.644 ERROR 3250 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.cloud.function.context.config.JsonMessageConverter.<init>(JsonMessageConverter.java:47)

The following method did not exist:

    'void org.springframework.messaging.converter.AbstractMessageConverter.<init>(org.springframework.util.MimeType[])'

The method's class, org.springframework.messaging.converter.AbstractMessageConverter, is available from the following locations:

    jar:file:/home/enkhbold/.m2/repository/org/springframework/spring-messaging/5.2.1.RELEASE/spring-messaging-5.2.1.RELEASE.jar!/org/springframework/messaging/converter/AbstractMessageConverter.class

It was loaded from the following location:

    file:/home/enkhbold/.m2/repository/org/springframework/spring-messaging/5.2.1.RELEASE/spring-messaging-5.2.1.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.messaging.converter.AbstractMessageConverter

Process finished with exit code 1