activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Embedded broker with Spring : java.lang.ClassCastException
Date Mon, 03 Jul 2006 11:00:18 GMT
Ah - I think your problem could be that you are running different
versions of ActiveMQ against the same journal files.

The default journal directory is "../activemq-data" so moving that
directory out of the way will probably allow you to startup ActiveMQ

On 7/3/06, ENP <prokopiev@stc.donpac.ru> wrote:
>
> It was AMQ 4.0 with Java 1.5.0_04. Now I tried to use AMQ 4.0.1 and got:
>
> $ sh activemq
> ACTIVEMQ_HOME: /home/john/devel/java/jms/incubator-activemq-4.0.1
> Loading message broker from: xbean:activemq.xml
> INFO  BrokerService                  - ActiveMQ 4.0.1 JMS Message Broker
> (localhost) is starting
> INFO  BrokerService                  - For help or more information please
> see: http://incubator.apache.org/activemq/
> INFO  JDBCPersistenceAdapter         - Database driver recognized:
> [apache_derby_embedded_jdbc_driver]
> INFO  JournalPersistenceAdapter      - Journal Recovery Started from: Active
> Journal: using 2 x 20.0 Megs at:
> /home/john/devel/java/jms/incubator-activemq-4.0.1/bin/activemq-data/localhost/journal
> INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
> transactions recovered.
> INFO  TransportServerThreadSupport   - Listening for connections at:
> tcp://prokopiev.stc.donpac.ru:61234
> INFO  TransportConnector             - Connector
> tcp://prokopiev.stc.donpac.ru:61234 Started
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, ID:prokopiev.stc.donpac.ru-41252-1151923875228-1:0) started
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.ClassCastException: org.apache.activemq.broker.BrokerService
> ERROR: java.lang.Exception: java.lang.ClassCastException:
> org.apache.activemq.broker.BrokerService
> INFO  BrokerService                  - ActiveMQ Message Broker (localhost,
> ID:prokopiev.stc.donpac.ru-41252-1151923875228-1:0) is shutting down
> INFO  TransportConnector             - Connector
> tcp://prokopiev.stc.donpac.ru:61234 Stopped
> INFO  VMTransportFactory             - Shutting down VM connectors for
> broker: localhost
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, ID:prokopiev.stc.donpac.ru-41252-1151923875228-1:0) stopped
>
> I modify conf/log4j.properties:
>
> log4j.rootLogger=DEBUG, stdout, out
>
> # CONSOLE appender not used by default
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%-5p %-30.30c{1} - %m%n
> log4j.appender.stdout.threshold=DEBUG
>
> # File appender
> log4j.appender.out=org.apache.log4j.RollingFileAppender
> log4j.appender.out.file=activemq.log
> log4j.appender.out.maxFileSize=1024KB
> log4j.appender.out.maxBackupIndex=5
> log4j.appender.out.append=true
> log4j.appender.out.layout=org.apache.log4j.PatternLayout
> log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} -
> %m%n
>
> Now detail logging is:
>
> ...
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, ID:prokopiev.stc.donpac.ru-41258-1151924028885-1:0) started
> DEBUG DefaultListableBeanFactory     - Invoking BeanPostProcessors after
> initialization of bean 'broker'
> DEBUG ClassPathXmlApplicationContext - Publishing event in context
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=9740137]:
> org.springframework.context.event.ContextRefreshedEvent[source=org.apache.xbean.spring.context.ClassPathXmlApplicationContext:
> display name
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=9740137];
> startup date [Mon Jul 03 14:53:48 MSD 2006]; root of context hierarchy]
> DEBUG DefaultListableBeanFactory     - Returning cached instance of
> singleton bean 'broker'
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.ClassCastException: org.apache.activemq.broker.BrokerService
> ERROR: java.lang.Exception: java.lang.ClassCastException:
> org.apache.activemq.broker.BrokerService
> INFO  BrokerService                  - ActiveMQ Message Broker (localhost,
> ID:prokopiev.stc.donpac.ru-41258-1151924028885-1:0) is shutting down
> DEBUG BrokerService                  - Caught exception, must be shutting
> down: java.lang.IllegalStateException: Shutdown in progress
> INFO  TransportConnector             - Connector
> tcp://prokopiev.stc.donpac.ru:61234 Stopped
> INFO  VMTransportFactory             - Shutting down VM connectors for
> broker: localhost
> DEBUG JournalPersistenceAdapter      - Checkpoint started.
> DEBUG JournalPersistenceAdapter      - Checkpoint done.
> DEBUG JournalPersistenceAdapter      - Waking for checkpoint to complete.
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, ID:prokopiev.stc.donpac.ru-41258-1151924028885-1:0) stopped
>
>
>
> --
> View this message in context: http://www.nabble.com/Embedded-broker-with-Spring-%3A-java.lang.ClassCastException-tf1883713.html#a5149919
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message