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 15:25:22 GMT
The issue is now fixed in SVN HEAD.

Basically in versions 4.0.1 and earlier do not support the creation of
a regular BrokerService via a spring.xml file - it must be an instance
of XBeanBrokerService. I've patched this in SVN trunk.

As a workaround for now - please don't use the pure Spring XML
configuration file with the activemq script - use one of the normal
XBean based XML configuration files such as the one that ships with
the binary distro.


On 7/3/06, James Strachan <james.strachan@gmail.com> wrote:
> I managed to reproduce your error & created this JIRA to track it...
>
> http://issues.apache.org/activemq/browse/AMQ-790
>
> FWIW for some reason strack traces are gobbled up by the activemq
> start script - I've just patched that to make discoverging the issue
> simpler.
>
> It seems right now we don't support regular Spring XML configuration
> files creating instances of BrokerService in the activemq script. I
> should have a patch shortly which fixes this...
>
> On 7/3/06, ENP <prokopiev@stc.donpac.ru> wrote:
> >
> > Steps to reproduce:
> >
> > [john@prokopiev jms]$ unzip incubator-activemq-4.0.1.zip
> > Archive:  incubator-activemq-4.0.1.zip
> >    creating: incubator-activemq-4.0.1/
> >    creating: incubator-activemq-4.0.1/bin/
> >    creating: incubator-activemq-4.0.1/conf/
> >    creating: incubator-activemq-4.0.1/docs/
> >    creating: incubator-activemq-4.0.1/example/
> >    creating: incubator-activemq-4.0.1/example/activemq-web-console/
> > ...
> >    inflating: incubator-activemq-4.0.1/userGuide.html
> >    inflating: incubator-activemq-4.0.1/var/activemq.log
> > [john@prokopiev jms]$ echo '<?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> > "http://www.springframework.org/dtd/spring-beans.dtd">
> > <beans>
> > <bean id="broker" class="org.apache.activemq.broker.BrokerService"
> > init-method="start">
> > <property name="transportConnectorURIs">
> > <list>
> > <value>tcp://localhost:61234</value>
> > </list>
> > </property>
> > </bean>
> > </beans> ' > incubator-activemq-4.0.1/conf/activemq.xml
> > [john@prokopiev jms]$ cd incubator-activemq-4.0.1/bin
> > [john@prokopiev bin]$ 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-41458-1151926448246-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-41458-1151926448246-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-41458-1151926448246-1:0) stopped
> >
> > --
> > View this message in context: http://www.nabble.com/Embedded-broker-with-Spring-%3A-java.lang.ClassCastException-tf1883713.html#a5150409
> > Sent from the ActiveMQ - User forum at Nabble.com.
> >
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>


-- 

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

Mime
View raw message