Ah, the May4 snapshot runs the basic example fine.
Any suggestions on why the 'broker' bean can not be instantiated would
be appreciated.
Pasted the servicemix.xml and activemq.xml files in case that helps.
Thank you.
Mark Swanson wrote:
Hello,
I have 2.0.2 running with a number of services.
I downloaded the 3.0-SNAPSHOT but can't get it to run even the basic
example. Also, I carefully upgraded my packages to use org.apache, but
my own servicemix.xml no longer works either and gives me:
2006-05-04 09:47:25,662 INFO AbstractBeanFactory - Destroying
singletons in factory
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[xmlFileFilterID,schedulerFactoryBean,billScheduler,transactionManager,jbi,jencks,broker,transactionContextManager,jmsFactory];
root of BeanFactory hierarchy}
Caught: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager': FactoryBean threw
exception on object creation; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'broker' defined in file
[/home/mswanson/src/billproto/config/servicemix.xml]: Initialization of
bean failed; nested exception is java.lang.IllegalArgumentException: The
configuration has no BrokerService instance for resource: class path
resource [activemq.xml]
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'transactionManager': FactoryBean threw exception on
object creation; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'broker' defined in file
[/home/mswanson/src/billproto/config/servicemix.xml]: Initialization of
bean failed; nested exception is java.lang.IllegalArgumentException: The
configuration has no BrokerService instance for resource: class path
resource [activemq.xml]
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'broker' defined in file
[/home/mswanson/src/billproto/config/servicemix.xml]: Initialization of
bean failed; nested exception is java.lang.IllegalArgumentException: The
configuration has no BrokerService instance for resource: class path
resource [activemq.xml]
java.lang.IllegalArgumentException: The configuration has no
BrokerService instance for resource: class path resource [activemq.xml]
SERVICEMIX.XML:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:my="http://servicemix.apache.org/demo/">
<bean class="com.optimal.bill.scheduler.XmlFileFilter"
id="xmlFileFilterID">
</bean>
<!-- The factory for the quartz scheduler bean, which contains
a method called getScheduler() -->
<bean id="schedulerFactoryBean"
class="org.quartz.impl.StdSchedulerFactory"/>
<!-- The bean to be created via the factory bean -->
<bean id="billScheduler" factory-method="getScheduler"
factory-bean="schedulerFactoryBean" abstract="false" singleton="true"
lazy-init="default" autowire="default" dependency-check="default"></bean>
<!-- end billing beans -->
<bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
<!-- the JBI container -->
<sm:container id="jbi"
useMBeanServer="true"
createMBeanServer="true"
dumpStats="true"
statsInterval="10"
transactionManager="#transactionManager">
<sm:activationSpecs>
<!-- Look for files in the inbox directory,
send them to the scheduler -->
<sm:activationSpec
componentName="filePoller"
destinationService="my:billScheduler"
service="my:filePoller">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="org.apache.servicemix.components.file.FilePoller">
<property
name="workManager" ref="workManager" />
<property name="file"
value="inbox" />
<property name="period"
value="2000" />
<property name="filter">
<ref bean="xmlFileFilterID"/>
</property>
</bean>
</sm:component>
</sm:activationSpec>
<!-- Bill Scheduling Timer -->
<sm:activationSpec
componentName="billScheduler"
destinationService="my:bill2Request"
service="my:billScheduler">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="com.optimal.bill.scheduler.ScheduledBillSender">
<property name="factory">
<ref
bean="schedulerFactoryBean"/>
</property>
<property
name="theOpsChannel">
<ref
bean="opsChannel"></ref>
</property>
</bean>
</sm:component>
</sm:activationSpec>
<!-- Bill Converted 2 BillRequest -->
<sm:activationSpec
componentName="bill2Request"
destinationService="my:billRequest2CCAuthRequest"
service="my:bill2Request">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="com.optimal.bill.scheduler.BillTransform">
</bean>
</sm:component>
</sm:activationSpec>
<!-- Convert The BillRequest to a ccAuthRequest using XSLT -->
<sm:activationSpec componentName="transformer"
service="my:billRequest2CCAuthRequest" destinationService="my:trace">
<sm:component><bean
class="org.apache.servicemix.components.xslt.XsltComponent">
<property name="xsltResource"
value="classpath:/generated/MapToCreditCardV1Target.xslt"/>
</bean></sm:component>
</sm:activationSpec>
<!-- Route the event to a trace component that
just outputs the event to the console -->
<sm:activationSpec componentName="trace"
service="my:trace">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="org.apache.servicemix.components.util.TraceComponent" />
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
<!-- the JCA container -->
<bean id="jencks" class="org.jencks.JCAContainer" singleton="true">
<!-- lets use the default configuration of work manager and
transaction manager-->
<property name="bootstrapContext">
<bean class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="25"/>
</bean>
</property>
<!-- the JCA Resource Adapter -->
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
<property name="serverUrl" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>
<!-- message broker -->
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
<property name="config" value="classpath:activemq.xml"/>
</bean>
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>tcp://localhost:61616</value>
</property>
</bean>
</property>
</bean>
</beans>
ACTIVEMQ.XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN"
"http://activemq.org/dtd/activemq.dtd">
<beans>
<!--
==================================================================== -->
<!-- ActiveMQ Broker Configuration -->
<!--
==================================================================== -->
<broker>
<connector>
<tcpServerTransport uri="tcp://localhost:61616" backlog="1000"
useAsyncSend="true" maxOutstandingMessages="50"/>
</connector>
<persistence>
<cachePersistence>
<journalPersistence directory="../var/journal">
<jdbcPersistence dataSourceRef="derby-ds"/>
</journalPersistence>
</cachePersistence>
</persistence>
</broker>
<!--
==================================================================== -->
<!-- JDBC DataSource Configurations -->
<!--
==================================================================== -->
<!-- The Derby Datasource that will be used by the Broker -->
<bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
</property>
<property name="url">
<!-- Use a URL like 'jdbc:hsqldb:hsql://localhost:9001' if you
want to connect to a remote hsqldb -->
<value>jdbc:derby:derbydb;create=true</value>
</property>
<property name="username">
<value></value>
</property>
<property name="password">
<value></value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>
<!-- The MYSQL Datasource that will be used by the Broker -->
<bean id="mysql-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost/activemq</value>
</property>
<property name="username">
<value>myname</value>
</property>
<property name="password">
<value>mypassword</value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>
</beans>
--
Free replacement for Exchange and Outlook (Contacts and Calendar)
http://www.ScheduleWorld.com/tg/
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb