Skip to content

Unable to execute producer tests kafka #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
prapurna-manda opened this issue Aug 17, 2022 · 0 comments
Open

Unable to execute producer tests kafka #392

prapurna-manda opened this issue Aug 17, 2022 · 0 comments

Comments

@prapurna-manda
Copy link

I am trying to execute kafka contract tests using SCC.
I keep running into this error :
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contractVerifierKafkaMessageExchange' defined in class path resource [org/springframework/cloud/contract/verifier/messaging/kafka/ContractVerifierKafkaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.verifier.messaging.MessageVerifier]: Factory method 'contractVerifierKafkaMessageExchange' threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.boot.autoconfigure.kafka.KafkaProperties$Consumer.getGroupId()" because the return value of "org.springframework.boot.autoconfigure.kafka.KafkaProperties.getConsumer()" is null at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]

My Test looks like this :
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = KafkaEmployeeEventPublisher.class) @AutoConfigureMessageVerifier @EmbeddedKafka(partitions = 1, topics = {"test.topic"}) @ActiveProfiles("test") public abstract class BaseClassTest {

I am using spring-kafka.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant