java.lang.IllegalStateException: Another endpoint is already registered with id 'KPOC'

GitHub | srikant-mvs | 2 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    java.lang.IllegalStateException: Another endpoint is already registered with id

    GitHub | 2 months ago | srikant-mvs
    java.lang.IllegalStateException: Another endpoint is already registered with id 'KPOC'
  2. 0

    Failed to start Kafka consumer - spring bean initialization error

    Stack Overflow | 1 month ago | Kuber
    org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
  3. 0

    If we have following situation: interface: {code:title=ConsumerService.java |borderStyle=solid} public interface ConsumerService<TPayLoad> { void consume(TPayLoad message); } {code} and also following interface implementation: {code:title=TestingQueueConsumerServiceImpl.java |borderStyle=solid} @Component public class TestingQueueConsumerServiceImpl implements ConsumerService<DemoMessage> { private Log log = LogFactory.getLog(getClass()); @Transactional @RabbitListener(queues = "${rabbitmq.queue.demo}", id = "myuniquecustomid") public void consume(@Payload TestMessage message) { Assert.notNull(message); log.info(message.toString()); } } {code} on application start we gets following exception {noformat} 2016-03-24 09:26:48.971 INFO 58632 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat 2016-03-24 09:26:48.982 ERROR 58632 --- [ main] o.s.boot.SpringApplication : Application startup failed java.lang.IllegalStateException: Another endpoint is already registered with id 'myuniquecustomid' at org.springframework.util.Assert.state(Assert.java:392) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.registerListenerContainer(RabbitListenerEndpointRegistry.java:146) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.registerListenerContainer(RabbitListenerEndpointRegistry.java:122) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistrar.registerAllEndpoints(RabbitListenerEndpointRegistrar.java:134) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistrar.afterPropertiesSet(RabbitListenerEndpointRegistrar.java:128) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor.afterSingletonsInstantiated(RabbitListenerAnnotationBeanPostProcessor.java:209) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] {noformat} This is happening as @RabbitListener annotation creates two listener instances, one for interface method and one for implementing method. After implementation of `ConsumerService<DemoMessage>` is removed then everything is working as expected.

    Spring JIRA | 1 year ago | Josip Medic
    java.lang.IllegalStateException: Another endpoint is already registered with id 'myuniquecustomid'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If we have following situation: interface: {code:title=ConsumerService.java |borderStyle=solid} public interface ConsumerService<TPayLoad> { void consume(TPayLoad message); } {code} and also following interface implementation: {code:title=TestingQueueConsumerServiceImpl.java |borderStyle=solid} @Component public class TestingQueueConsumerServiceImpl implements ConsumerService<DemoMessage> { private Log log = LogFactory.getLog(getClass()); @Transactional @RabbitListener(queues = "${rabbitmq.queue.demo}", id = "myuniquecustomid") public void consume(@Payload TestMessage message) { Assert.notNull(message); log.info(message.toString()); } } {code} on application start we gets following exception {noformat} 2016-03-24 09:26:48.971 INFO 58632 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat 2016-03-24 09:26:48.982 ERROR 58632 --- [ main] o.s.boot.SpringApplication : Application startup failed java.lang.IllegalStateException: Another endpoint is already registered with id 'myuniquecustomid' at org.springframework.util.Assert.state(Assert.java:392) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.registerListenerContainer(RabbitListenerEndpointRegistry.java:146) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.registerListenerContainer(RabbitListenerEndpointRegistry.java:122) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistrar.registerAllEndpoints(RabbitListenerEndpointRegistrar.java:134) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistrar.afterPropertiesSet(RabbitListenerEndpointRegistrar.java:128) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor.afterSingletonsInstantiated(RabbitListenerAnnotationBeanPostProcessor.java:209) ~[spring-rabbit-1.5.4.RELEASE.jar:na] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE] {noformat} This is happening as @RabbitListener annotation creates two listener instances, one for interface method and one for implementing method. After implementation of `ConsumerService<DemoMessage>` is removed then everything is working as expected.

    Spring JIRA | 1 year ago | Josip Medic
    java.lang.IllegalStateException: Another endpoint is already registered with id 'myuniquecustomid'
  6. 0

    KafkaException: Could not instantiate class JsonDeserializer

    Stack Overflow | 1 month ago | Mykhaylo Adamovych
    org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Another endpoint is already registered with id 'KPOC'

    at org.springframework.util.Assert.state()
  2. Spring Core
    Assert.state
    1. org.springframework.util.Assert.state(Assert.java:392)
    1 frame
  3. org.springframework.kafka
    KafkaListenerAnnotationBeanPostProcessor.afterSingletonsInstantiated
    1. org.springframework.kafka.config.KafkaListenerEndpointRegistry.registerListenerContainer(KafkaListenerEndpointRegistry.java:152)
    2. org.springframework.kafka.config.KafkaListenerEndpointRegistry.registerListenerContainer(KafkaListenerEndpointRegistry.java:128)
    3. org.springframework.kafka.config.KafkaListenerEndpointRegistrar.registerAllEndpoints(KafkaListenerEndpointRegistrar.java:138)
    4. org.springframework.kafka.config.KafkaListenerEndpointRegistrar.afterPropertiesSet(KafkaListenerEndpointRegistrar.java:132)
    5. org.springframework.kafka.annotation.KafkaListenerAnnotationBeanPostProcessor.afterSingletonsInstantiated(KafkaListenerAnnotationBeanPostProcessor.java:224)
    5 frames
  4. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792)
    1 frame
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
    2 frames
  6. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    3 frames
  7. Jetty
    AbstractLifeCycle.start
    1. org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
    2. org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
    3. org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
    4. org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
    5. org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
    6. org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
    7. org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
    8. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    9. org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    10. org.eclipse.jetty.server.Server.doStart(Server.java:282)
    11. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    11 frames
  8. net.sourceforge.eclipsejetty
    JettyEmbeddedLauncherMain.main
    1. net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedAdapter.start(JettyEmbeddedAdapter.java:67)
    2. net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:84)
    3. net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain.main(JettyEmbeddedLauncherMain.java:42)
    3 frames