You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Hidekazu <hi...@yahoo.co.jp> on 2017/05/01 08:29:54 UTC

LifecycleProcessor exception

Hi, Dear All

I have an ActiveMQ ver 5.14.3 and had a problem once when restarted it by
executing “activemq restart” command.
Here are the exceptions in activemq.log.
I found there were several posts about this LifecycleProcessor exception in
the forum, however, none of them didn’t seem to be the reason which caused
my restart problem.
I also want to know what LifecycleProcessor is like.

If you guys met similar like what I described, Please let me know. Thanks a
lot. 

------------------------------------------------------------------------------------------------
2017-04-24 22:07:16,020 | WARN  | Exception thrown from LifecycleProcessor
on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
java.lang.IllegalStateException: LifecycleProcessor not initialized - call
'refresh' before invoking lifecycle methods via the context:
org.apache.activemq.xbean.XBeanBrokerFactory$1@4101baf8: startup date [Mon
Apr 24 22:06:51 JST 2017]; root of context hierarchy
	at
org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:357)
	at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:884)
	at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:843)
	at
org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)
	at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:875)
	at
org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:629)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1700)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
	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:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
	at org.apache.activemq.console.Main.main(Main.java:115)
2017-04-24 22:07:16,030 | WARN  | Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class
path resource [activemq.xml]: Invocation of init method failed; nested
exception is java.util.ConcurrentModificationException |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
------------------------------------------------------------------------------------------------



--
View this message in context: http://activemq.2283324.n4.nabble.com/LifecycleProcessor-exception-tp4725380.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: LifecycleProcessor exception

Posted by Hidekazu <hi...@yahoo.co.jp>.
Dear Tim

I can't find a word to thank you!!

> In the meantime, did anything actually fail when you did the restart? 
> Restarting the broker should definitely work without this error, but did
> it 
> have any negative effect other than the scary-sounding message showing up 
> in the logs? I'm just trying to make sure I understand the real-world 
> impact of the problem. 

I'm sorry for not saying what was actually the problem.

ActiveMQ failed to restart and stop when I got the exception.
This was the actual problem.

Thanks.
Kawai



--
View this message in context: http://activemq.2283324.n4.nabble.com/LifecycleProcessor-exception-tp4725380p4725958.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: LifecycleProcessor exception

Posted by Tim Bain <tb...@alumni.duke.edu>.
1) Those JARs should all be compatible with one another, since they're all
packaged as part of the ActiveMQ installation bundle. I was trying to see
if maybe you'd added your own Spring JARs to the classpath in addition to
the ones from ActiveMQ's lib directory, but that's clearly not the case,
and I'm sorry I missed the line in your second post where you said it was a
clean install.

2) I meant "clean install" not in the Maven (or Gradle) sense but just in
the sense of "did you add additional JARs by hand (not clean) or did you
just unpack the zip file and edit the config files (clean)?" I was assuming
you followed
http://activemq.apache.org/getting-started.html#GettingStarted-UnixBinaryInstallationUnixBinaryInstallation
when doing your installation, though the other approaches are fine too.

I'd like to try to reproduce this, but my VM needs rebuilding before I can
do that, so it may take till the weekend to give this a try.

In the meantime, did anything actually fail when you did the restart?
Restarting the broker should definitely work without this error, but did it
have any negative effect other than the scary-sounding message showing up
in the logs? I'm just trying to make sure I understand the real-world
impact of the problem.

Thanks,
Tim

On Tue, May 9, 2017 at 1:04 AM, Hidekazu <hi...@yahoo.co.jp> wrote:

> Thanks Tim!
>
> (1)
> I made sure if my activemq loaded Spring-related JARs by booting activemq
> with -verbose:class option.
> There seem to be several Spring-related JARs as follows.
>
> /opt/apache-activemq/lib/activemq-spring-5.14.3.jar
> /opt/apache-activemq/lib/optional/spring-beans-4.1.9.RELEASE.jar
> /opt/apache-activemq/lib/optional/spring-context-4.1.9.RELEASE.jar
> /opt/apache-activemq/lib/optional/spring-core-4.1.9.RELEASE.jar
> /opt/apache-activemq/lib/optional/xbean-4.2.jar
>
> * /opt/apache-activemq/ is an install directory for activemq.
>
> Do those files have the possibility to cause the activemq restart problem?
>
> (2)
> Let me make sure the meaning of "clean install".
>
> http://activemq.apache.org/getting-started.html#GettingStart
> ed-UnixSourceInstallation
>
> According to the URL above, "clean install" looks like executing mvn clean
> install command.
>
> (ex)
> mvn clean install # add "-Dmaven.test.skip=true" if tests are failing on
> your system (should not happen)
>
> However, I just put activemq package in /opt/apache-activemq directory.
> I said to you that I did clean install before.
> I'm sorry if I misunderstood the meaning of clean install.
>
> Thanks
> Kawai
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nab
> ble.com/LifecycleProcessor-exception-tp4725380p4725818.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: LifecycleProcessor exception

Posted by Hidekazu <hi...@yahoo.co.jp>.
Thanks Tim!

(1)
I made sure if my activemq loaded Spring-related JARs by booting activemq
with -verbose:class option.
There seem to be several Spring-related JARs as follows.

/opt/apache-activemq/lib/activemq-spring-5.14.3.jar
/opt/apache-activemq/lib/optional/spring-beans-4.1.9.RELEASE.jar
/opt/apache-activemq/lib/optional/spring-context-4.1.9.RELEASE.jar
/opt/apache-activemq/lib/optional/spring-core-4.1.9.RELEASE.jar
/opt/apache-activemq/lib/optional/xbean-4.2.jar

* /opt/apache-activemq/ is an install directory for activemq.

Do those files have the possibility to cause the activemq restart problem?

(2)
Let me make sure the meaning of "clean install".

http://activemq.apache.org/getting-started.html#GettingStarted-UnixSourceInstallation

According to the URL above, "clean install" looks like executing mvn clean
install command.

(ex)
mvn clean install # add "-Dmaven.test.skip=true" if tests are failing on
your system (should not happen)

However, I just put activemq package in /opt/apache-activemq directory.
I said to you that I did clean install before.
I'm sorry if I misunderstood the meaning of clean install.

Thanks
Kawai



--
View this message in context: http://activemq.2283324.n4.nabble.com/LifecycleProcessor-exception-tp4725380p4725818.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: LifecycleProcessor exception

Posted by Tim Bain <tb...@alumni.duke.edu>.
No problem, many people are off work for Golden Week.

What Spring-related JARs are on your broker's classpath? Have you added any
Spring-related JARs other than the one that came with the ActiveMQ
installation?

Tim

On Sun, May 7, 2017 at 8:40 PM, Hidekazu <hi...@yahoo.co.jp> wrote:

> Thanks a lot!
> I’m sorry for not responding for a while but I don’t forget the feeling of
> gratitude.
> In Japan, we had a long holiday called Golden Week and that’s the reason I
> couldn’t respond to you. Anyway,sorry.
>
> I’m running a standalone broker from a clean install.
> Does my answer make sense?
> Java version for activemq is 1.7.0_25
>
> Thanks.
> Kawai
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/LifecycleProcessor-exception-tp4725380p4725730.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: LifecycleProcessor exception

Posted by Hidekazu <hi...@yahoo.co.jp>.
Thanks a lot!
I’m sorry for not responding for a while but I don’t forget the feeling of
gratitude.
In Japan, we had a long holiday called Golden Week and that’s the reason I
couldn’t respond to you. Anyway,sorry.

I’m running a standalone broker from a clean install.
Does my answer make sense?
Java version for activemq is 1.7.0_25

Thanks.
Kawai




--
View this message in context: http://activemq.2283324.n4.nabble.com/LifecycleProcessor-exception-tp4725380p4725730.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: LifecycleProcessor exception

Posted by Tim Bain <tb...@alumni.duke.edu>.
LifecycleProcessor is a Spring class used to process lifecycle events such
as start, stop, restart, etc.

The first few results of
https://www.google.com/search?q=spring+lifecycleprocessor+not+initialized&oq=spring+LifecycleProcessor
all point to incompatible versions of the various Spring JARs. Are you
running a standalone broker from a clean install, or have you put
additional Spring JARs on the classpath (possibly by running an embedded
broker)?

Tim

On May 1, 2017 2:41 AM, "Hidekazu" <hi...@yahoo.co.jp> wrote:

> Hi, Dear All
>
> I have an ActiveMQ ver 5.14.3 and had a problem once when restarted it by
> executing “activemq restart” command.
> Here are the exceptions in activemq.log.
> I found there were several posts about this LifecycleProcessor exception in
> the forum, however, none of them didn’t seem to be the reason which caused
> my restart problem.
> I also want to know what LifecycleProcessor is like.
>
> If you guys met similar like what I described, Please let me know. Thanks a
> lot.
>
> ------------------------------------------------------------
> ------------------------------------
> 2017-04-24 22:07:16,020 | WARN  | Exception thrown from LifecycleProcessor
> on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
> java.lang.IllegalStateException: LifecycleProcessor not initialized - call
> 'refresh' before invoking lifecycle methods via the context:
> org.apache.activemq.xbean.XBeanBrokerFactory$1@4101baf8: startup date [Mon
> Apr 24 22:06:51 JST 2017]; root of context hierarchy
>         at
> org.springframework.context.support.AbstractApplicationContext.
> getLifecycleProcessor(AbstractApplicationContext.java:357)
>         at
> org.springframework.context.support.AbstractApplicationContext.doClose(
> AbstractApplicationContext.java:884)
>         at
> org.springframework.context.support.AbstractApplicationContext.close(
> AbstractApplicationContext.java:843)
>         at
> org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)
>         at org.apache.activemq.broker.BrokerService.stop(
> BrokerService.java:875)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.stop(
> XBeanBrokerService.java:122)
>         at org.apache.activemq.broker.BrokerService.start(
> BrokerService.java:629)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(
> XBeanBrokerService.java:73)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1700)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:476)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:303)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:230)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> AbstractBeanFactory.java:299)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:194)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> preInstantiateSingletons(DefaultListableBeanFactory.java:755)
>         at
> org.springframework.context.support.AbstractApplicationContext.
> finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:480)
>         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:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
>         at org.apache.activemq.console.Main.main(Main.java:115)
> 2017-04-24 22:07:16,030 | WARN  | Exception encountered during context
> initialization - cancelling refresh attempt:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> class
> path resource [activemq.xml]: Invocation of init method failed; nested
> exception is java.util.ConcurrentModificationException |
> org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
> ------------------------------------------------------------
> ------------------------------------
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/LifecycleProcessor-exception-tp4725380.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>