You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Websphere and ActiveMQ <de...@hotmail.com> on 2009/05/12 22:42:17 UTC

I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

[root@cardisdev2 apache-activemq-5.2.0]# ./bin/activemq 
ACTIVEMQ_HOME: /opt/apache-activemq-5.2.0
ACTIVEMQ_BASE: /opt/apache-activemq-5.2.0
Loading message broker from: xbean:activemq.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
java.lang.RuntimeException: Failed to execute start task. Reason:
java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:225)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
        at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
        ... 10 more
Caused by: java.lang.ExceptionInInitializerError
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:55)
        at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:42)
        at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
        ... 14 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@2b5ac3c9 for
org.apache.commons.logging.impl.Log4JLogger
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:398)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.<clinit>(XBeanBrokerFactory.java:43)
        ... 23 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@2b5ac3c9 for
org.apache.commons.logging.impl.Log4JLogger
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
        ... 27 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
        at java.lang.Class.getConstructor0(Class.java:2671)
        at java.lang.Class.getConstructor(Class.java:1629)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:429)
        ... 28 more
ERROR: java.lang.Exception: java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
java.lang.Exception: java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:225)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: java.io.IOException: Could not load xbean
factory:java.lang.ExceptionInInitializerError
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
        at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
        ... 10 more
Caused by: java.lang.ExceptionInInitializerError
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:55)
        at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:42)
        at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
        ... 14 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@2b5ac3c9 for
org.apache.commons.logging.impl.Log4JLogger
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:398)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.<clinit>(XBeanBrokerFactory.java:43)
        ... 23 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@2b5ac3c9 for
org.apache.commons.logging.impl.Log4JLogger
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
        ... 27 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
        at java.lang.Class.getConstructor0(Class.java:2671)
        at java.lang.Class.getConstructor(Class.java:1629)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:429)
        ... 28 more

-- 
View this message in context: http://www.nabble.com/I-can-not-start-activemq-on-Red-hat-Linux-64-bits-computer%2C-looks-like-can-not-found-log4j......-tp23510018p23510018.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by zfbrad <br...@zerofootprint.net>.
Ok so this is pretty interesting.  IT was definitely conflicting with
something else.  I have a feeling it's the log4j jar that's in my eclipse
plugins directory.  Anyway, when I delete log4j from the activemq
lib/optional directory, it works.



bsnyder wrote:
> 
> On Mon, Jun 29, 2009 at 9:44 AM, zfbrad<br...@zerofootprint.net>
> wrote:
>>
>> Did you figure out what was going on here?  I'm running OSX and I have
>> the
>> same exception. Seems to not be able to find log4j even though it's in
>> the
>> activemq directory.
> 
> I develop and run ActiveMQ on MacOS X all the time without this issue.
> How exactly are you running ActiveMQ? Is it possible that you have
> older versions of Log4J or Commons Logging on the classpath that are
> being picked up instead?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
> 
> 

-- 
View this message in context: http://www.nabble.com/I-can-not-start-activemq-on-Red-hat-Linux-64-bits-computer%2C-looks-like-can-not-found-log4j......-tp23510018p24259314.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Jun 29, 2009 at 9:44 AM, zfbrad<br...@zerofootprint.net> wrote:
>
> Did you figure out what was going on here?  I'm running OSX and I have the
> same exception. Seems to not be able to find log4j even though it's in the
> activemq directory.

I develop and run ActiveMQ on MacOS X all the time without this issue.
How exactly are you running ActiveMQ? Is it possible that you have
older versions of Log4J or Commons Logging on the classpath that are
being picked up instead?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by Websphere and ActiveMQ <de...@hotmail.com>.
No, I didn't. sorry. I switched to 32 bits linux


zfbrad wrote:
> 
> Did you figure out what was going on here?  I'm running OSX and I have the
> same exception. Seems to not be able to find log4j even though it's in the
> activemq directory.  
> 
> 
> Websphere and ActiveMQ wrote:
>> 
>> Yes. log4j jar file is there.
>> 
>> 
>> bsnyder wrote:
>>> 
>>> On Tue, May 12, 2009 at 2:42 PM, Websphere and ActiveMQ
>>> <de...@hotmail.com> wrote:
>>>>
>>>> [root@cardisdev2 apache-activemq-5.2.0]# ./bin/activemq
>>>> ACTIVEMQ_HOME: /opt/apache-activemq-5.2.0
>>>> ACTIVEMQ_BASE: /opt/apache-activemq-5.2.0
>>>> Loading message broker from: xbean:activemq.xml
>>>> ERROR: java.lang.RuntimeException: Failed to execute start task.
>>>> Reason:
>>>> java.io.IOException: Could not load xbean
>>>> factory:java.lang.ExceptionInInitializerError
>>>> java.lang.RuntimeException: Failed to execute start task. Reason:
>>>> java.io.IOException: Could not load xbean
>>>> factory:java.lang.ExceptionInInitializerError
>>> ...
>>>> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
>>> 
>>> The Log4J JAR (log4j-1.2.14.jar) file should be in the lib/optional
>>> directory. Do you have that in your ActiveMQ lib/optional directory?
>>> 
>>> Bruce
>>> -- 
>>> perl -e 'print
>>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>>> );'
>>> 
>>> ActiveMQ in Action: http://bit.ly/2je6cQ
>>> Blog: http://bruceblog.org/
>>> Twitter: http://twitter.com/brucesnyder
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/I-can-not-start-activemq-on-Red-hat-Linux-64-bits-computer%2C-looks-like-can-not-found-log4j......-tp23510018p24256694.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by zfbrad <br...@zerofootprint.net>.
Did you figure out what was going on here?  I'm running OSX and I have the
same exception. Seems to not be able to find log4j even though it's in the
activemq directory.  


Websphere and ActiveMQ wrote:
> 
> Yes. log4j jar file is there.
> 
> 
> bsnyder wrote:
>> 
>> On Tue, May 12, 2009 at 2:42 PM, Websphere and ActiveMQ
>> <de...@hotmail.com> wrote:
>>>
>>> [root@cardisdev2 apache-activemq-5.2.0]# ./bin/activemq
>>> ACTIVEMQ_HOME: /opt/apache-activemq-5.2.0
>>> ACTIVEMQ_BASE: /opt/apache-activemq-5.2.0
>>> Loading message broker from: xbean:activemq.xml
>>> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
>>> java.io.IOException: Could not load xbean
>>> factory:java.lang.ExceptionInInitializerError
>>> java.lang.RuntimeException: Failed to execute start task. Reason:
>>> java.io.IOException: Could not load xbean
>>> factory:java.lang.ExceptionInInitializerError
>> ...
>>> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
>> 
>> The Log4J JAR (log4j-1.2.14.jar) file should be in the lib/optional
>> directory. Do you have that in your ActiveMQ lib/optional directory?
>> 
>> Bruce
>> -- 
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>> 
>> ActiveMQ in Action: http://bit.ly/2je6cQ
>> Blog: http://bruceblog.org/
>> Twitter: http://twitter.com/brucesnyder
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/I-can-not-start-activemq-on-Red-hat-Linux-64-bits-computer%2C-looks-like-can-not-found-log4j......-tp23510018p24256596.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by Websphere and ActiveMQ <de...@hotmail.com>.
Yes. log4j jar file is there.


bsnyder wrote:
> 
> On Tue, May 12, 2009 at 2:42 PM, Websphere and ActiveMQ
> <de...@hotmail.com> wrote:
>>
>> [root@cardisdev2 apache-activemq-5.2.0]# ./bin/activemq
>> ACTIVEMQ_HOME: /opt/apache-activemq-5.2.0
>> ACTIVEMQ_BASE: /opt/apache-activemq-5.2.0
>> Loading message broker from: xbean:activemq.xml
>> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
>> java.io.IOException: Could not load xbean
>> factory:java.lang.ExceptionInInitializerError
>> java.lang.RuntimeException: Failed to execute start task. Reason:
>> java.io.IOException: Could not load xbean
>> factory:java.lang.ExceptionInInitializerError
> ...
>> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> 
> The Log4J JAR (log4j-1.2.14.jar) file should be in the lib/optional
> directory. Do you have that in your ActiveMQ lib/optional directory?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
> 
> 

-- 
View this message in context: http://www.nabble.com/I-can-not-start-activemq-on-Red-hat-Linux-64-bits-computer%2C-looks-like-can-not-found-log4j......-tp23510018p23521477.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: I can not start activemq on Red hat Linux 64 bits computer, looks like can not found log4j......

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, May 12, 2009 at 2:42 PM, Websphere and ActiveMQ
<de...@hotmail.com> wrote:
>
> [root@cardisdev2 apache-activemq-5.2.0]# ./bin/activemq
> ACTIVEMQ_HOME: /opt/apache-activemq-5.2.0
> ACTIVEMQ_BASE: /opt/apache-activemq-5.2.0
> Loading message broker from: xbean:activemq.xml
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.io.IOException: Could not load xbean
> factory:java.lang.ExceptionInInitializerError
> java.lang.RuntimeException: Failed to execute start task. Reason:
> java.io.IOException: Could not load xbean
> factory:java.lang.ExceptionInInitializerError
...
> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger

The Log4J JAR (log4j-1.2.14.jar) file should be in the lib/optional
directory. Do you have that in your ActiveMQ lib/optional directory?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder