Skip to content
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

Fail to load network of broker configuration #3511

Open
enzdal opened this issue Feb 14, 2022 · 0 comments
Open

Fail to load network of broker configuration #3511

enzdal opened this issue Feb 14, 2022 · 0 comments

Comments

@enzdal
Copy link

enzdal commented Feb 14, 2022

Describe the bug
Hi, we are configuring the brokers to have more replicas. We tried to use the configuration as suggested in the comments of the activemq.xml file but we are getting an error while parsing the xml.

To Reproduce
Steps to reproduce the behavior:

  1. Go on activemq.xml file, uncomment the section
  2. run an instance of broker

Expected behavior
The broker should start and connect to the other nodes.

Version of Kapua
latest development

Type of deployment
[ ] Docker
[ ] Openshift (in its variants)
[ ] Others
[x] Kubernetes

Main component affected
[ ] Console (in case of console please report info on which browser you encountered the problem)
[ ] REST API
[x] Message Broker
[ ] - Others

The error:

Loading message broker from: xbean:activemq.xml
14:22:30.579 [main] INFO  o.a.a.xbean.XBeanBrokerFactory$1 - Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@24b1d79b: startup date [Mon Feb 14 14:22:30 UTC 2022]; root of context hierarchy
14:22:30.740 [main] INFO  o.a.x.s.c.v.XBeanXmlBeanDefinitionReader - Loading XML bean definitions from class path resource [activemq.xml]
14:22:31.402 [main] ERROR o.a.a.xbean.XBeanBrokerFactory - Failed to load: class path resource [activemq.xml], reason: Configuration problem: Bean name 'VirtualTopic.>' is already used in this <beans> element
Offending resource: class path resource [activemq.xml]

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean name 'VirtualTopic.>' is already used in this <beans> element
Offending resource: class path resource [activemq.xml]

        at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:316)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.checkNameUniqueness(BeanDefinitionParserDelegate.java:525)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:471)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:226)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:278)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)
        at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1427)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1480)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:1034)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1218)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1194)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseListElement(XBeanNamespaceHandler.java:611)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:604)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.tryParseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:573)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.addNestedPropertyElements(XBeanNamespaceHandler.java:542)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:229)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:278)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)
        at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1427)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1480)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:1034)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1218)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1194)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseListElement(XBeanNamespaceHandler.java:611)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:604)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.tryParseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:573)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.addNestedPropertyElements(XBeanNamespaceHandler.java:542)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:229)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:278)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)
        at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1427)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
        at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510)
        at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:541)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
        at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
        at org.apache.activemq.console.Main.main(Main.java:115)
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean name 'VirtualTopic.>' is already used in this <beans> element
Offending resource: class path resource [activemq.xml]
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