[ 
https://issues.apache.org/jira/browse/AMQ-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Shupletsov updated AMQ-9532:
-----------------------------------
    Description: 
If the broker has limited -Xss value, and there is a destination with a lot of 
nodes(i.e. 1.2....200), the broker fails on restart with the following error:

 

{{java.lang.RuntimeException: Failed to execute start task. Reason: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'activemq-broker' defined in class path resource [activemq.xml]: 
Invocation of init method failed; nested exception is 
java.lang.StackOverflowError}}
{{at 
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)}}
{{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)}}
{{Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'activemq-broker' defined in class path resource 
[activemq.xml]: Invocation of init method failed; nested exception is 
java.lang.StackOverflowError}}
{{at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619)}}
{{at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)}}
{{at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)}}
{{at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)}}
{{at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)}}
{{at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)}}
{{at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)}}
{{at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)}}
{{at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)}}
{{at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:737)}}
{{at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)}}
{{at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)}}
{{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)}}
{{... 10 more}}
{{Caused by: java.lang.StackOverflowError}}
{{at java.util.HashMap.putVal(HashMap.java:630)}}
{{at java.util.HashMap.put(HashMap.java:613)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.getChildOrCreate(DestinationMapNode.java:81)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
{{at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}

  was:
If the broker has limited -Xss value, and there is a destination with a lot of 
nodes(i.e. 1.2....200), the broker fails on restart with the following error:

 

{{{{java.lang.RuntimeException: Failed to execute start task. Reason: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'activemq-broker' defined in class path resource [activemq.xml]: 
Invocation of init method failed; nested exception is 
java.lang.StackOverflowError
    at 
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)
    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)
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'activemq-broker' defined in class path resource 
[activemq.xml]: Invocation of init method failed; nested exception is 
java.lang.StackOverflowError
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:737)
    at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
    at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    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)
    ... 10 more
Caused by: java.lang.StackOverflowError
    at java.util.HashMap.putVal(HashMap.java:630)
    at java.util.HashMap.put(HashMap.java:613)
    at 
org.apache.activemq.filter.DestinationMapNode.getChildOrCreate(DestinationMapNode.java:81)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)
    at 
org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}}}


> StackOverflowError on broker start if there are destinations with many modes
> ----------------------------------------------------------------------------
>
>                 Key: AMQ-9532
>                 URL: https://issues.apache.org/jira/browse/AMQ-9532
>             Project: ActiveMQ Classic
>          Issue Type: Bug
>            Reporter: Nikita Shupletsov
>            Priority: Minor
>
> If the broker has limited -Xss value, and there is a destination with a lot 
> of nodes(i.e. 1.2....200), the broker fails on restart with the following 
> error:
>  
> {{java.lang.RuntimeException: Failed to execute start task. Reason: 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'activemq-broker' defined in class path resource [activemq.xml]: 
> Invocation of init method failed; nested exception is 
> java.lang.StackOverflowError}}
> {{at 
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)}}
> {{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)}}
> {{Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'activemq-broker' defined in class path resource 
> [activemq.xml]: Invocation of init method failed; nested exception is 
> java.lang.StackOverflowError}}
> {{at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619)}}
> {{at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)}}
> {{at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)}}
> {{at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)}}
> {{at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)}}
> {{at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)}}
> {{at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)}}
> {{at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)}}
> {{at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)}}
> {{at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:737)}}
> {{at 
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)}}
> {{at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)}}
> {{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)}}
> {{... 10 more}}
> {{Caused by: java.lang.StackOverflowError}}
> {{at java.util.HashMap.putVal(HashMap.java:630)}}
> {{at java.util.HashMap.put(HashMap.java:613)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.getChildOrCreate(DestinationMapNode.java:81)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}
> {{at 
> org.apache.activemq.filter.DestinationMapNode.add(DestinationMapNode.java:141)}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to