Guillaume, Yes, I found the problem. I'm an idiot.
I for some reason had decided to try and use the JmsTemplate stuff on my class, rather than point the JmsReceiverComponent at my POJO. Have other questions...which I'll post independently for the sake of documentation though. Cheers. Thanks for following up. Kit gnodet wrote: > > Did you solve this problem ? > I think your com.raytheon.ap.emaf.comm.CommService bean has some problems > with the 'template' property and spring can not use it. > > Cheers, > Guillaume Nodet > > On 6/21/06, kitplummer <[EMAIL PROTECTED]> wrote: >> >> >> Just did a mvn clean test and now have this problem: >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.746 sec >> <<< FAILURE! >> testBoot(com.raytheon.ap.emaf.test.JMSRegisterCapabilityTest) Time >> elapsed: >> 2.733 sec <<< ERROR! >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean >> with name 'com.raytheon.ap.emaf.comm.CommService#75455c' defined in class >> path resource [jms-boot-xbean.xml]: >> Error setting property values; nested exception is >> org.springframework.beans.NotWritablePropertyException: Invalid property >> 'template' of bean class [com.raytheon.ap.emaf.comm.CommService >> ]: Bean property 'template' is not writable or has an invalid setter >> method: >> Does the parameter type of the setter match the return type of the >> getter? >> org.springframework.beans.NotWritablePropertyException: Invalid property >> 'template' of bean class [com.raytheon.ap.emaf.comm.CommService]: Bean >> property 'template' is not writable or has >> an invalid setter method: Does the parameter type of the setter match the >> return type of the getter? >> at >> org.springframework.beans.BeanWrapperImpl.setPropertyValue( >> BeanWrapperImpl.java:567) >> at >> org.springframework.beans.BeanWrapperImpl.setPropertyValue( >> BeanWrapperImpl.java:469) >> at >> org.springframework.beans.BeanWrapperImpl.setPropertyValue( >> BeanWrapperImpl.java:626) >> at >> org.springframework.beans.BeanWrapperImpl.setPropertyValues( >> BeanWrapperImpl.java:653) >> at >> org.springframework.beans.BeanWrapperImpl.setPropertyValues( >> BeanWrapperImpl.java:642) >> >> I'm using the stuff straight out of the examples on the webpage. >> >> >> kitplummer wrote: >> > >> > Here's whats in the activemq.xml file: >> > >> > <?xml version="1.0" encoding="UTF-8"?> >> > <beans xmlns="http://activemq.org/config/1.0"> >> > >> > <broker persistent="false"> >> > >> > <transportConnectors> >> > <transportConnector uri="tcp://localhost:61626" /> >> > </transportConnectors> >> > >> > </broker> >> > >> > </beans> >> > >> > Spring 1.2.6 >> > ServiceMix 3.0-SNAPSHOT >> > Xbean-Spring 2.3 >> > ActiveMQ 4.0-SNAPSHOT >> > >> > Anything else you want the version on? Let me know. >> > >> > Thanks. >> > Kit >> > >> > >> > gnodet wrote: >> >> >> >> It seems the activemq.xml can not be parsed. >> >> Could you send it and indicate which version you use ? >> >> >> >> Cheers, >> >> Guillaume Nodet >> >> >> >> On 6/21/06, kitplummer <[EMAIL PROTECTED]> wrote: >> >>> >> >>> >> >>> Not sure what is not allowing the following configuration: >> >>> >> >>> <?xml version="1.0" encoding="UTF-8"?> >> >>> <beans xmlns:sm="http://servicemix.apache.org/config/1.0" >> >>> xmlns:emaf="http://emaf.ap.raytheon.com/"> >> >>> >> >>> <bean id="broker" >> >>> class="org.apache.activemq.xbean.BrokerFactoryBean" >> >>> singleton="true"> >> >>> <property name="config" value="classpath:activemq.xml"/> >> >>> </bean> >> >>> >> >>> <!-- the JBI container --> >> >>> <sm:container id="jbi" depends-on="broker" embedded="true"> >> >>> <sm:activationSpecs> >> >>> >> >>> <sm:activationSpec componentName="commservice" >> >>> service="emaf:commservice" >> >>> destinationService="emaf:lrservice"> >> >>> <sm:component> >> >>> <bean >> class="com.raytheon.ap.emaf.comm.CommService >> "> >> >>> <property name="template"> >> >>> <bean >> >>> class="org.springframework.jms.core.JmsTemplate"> >> >>> <property name="connectionFactory"> >> >>> <ref local="jmsFactory"/> >> >>> </property> >> >>> <property >> name="defaultDestinationName" >> >>> value="emaf.capabilities"/> >> >>> <property name="pubSubDomain" >> >>> value="true"/> >> >>> </bean> >> >>> </property> >> >>> </bean> >> >>> </sm:component> >> >>> </sm:activationSpec> >> >>> >> >>> <sm:activationSpec id="lrservice" >> service="emaf:lrservice"> >> >>> <sm:component> >> >>> <bean class="com.raytheon.ap.emaf.lr.LRService"/> >> >>> </sm:component> >> >>> </sm:activationSpec> >> >>> >> >>> </sm:activationSpecs> >> >>> </sm:container> >> >>> >> >>> >> >>> <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> >> >>> >> >>> Here's the test: >> >>> >> >>> ... >> >>> public class JMSRegisterCapabilityTest extends SpringTestSupport { >> >>> >> >>> public int messageCount = 1; >> >>> >> >>> public void init(){ >> >>> >> >>> } >> >>> >> >>> public void testBoot() throws Exception { >> >>> >> >>> LRService lrservice = (LRService) getBean("lrservice"); >> >>> >> >>> CommService comm = (CommService) getBean("commservice"); >> >>> log.info("Sleeping for 2 seconds in testBoot()"); >> >>> Thread.sleep(2000); >> >>> int retval = comm.boot(); >> >>> >> >>> assertEquals(0, retval); >> >>> assertMessagesReceived(lrservice.getMessageList(), >> >>> messageCount); >> >>> >> >>> >> >>> } >> >>> >> >>> >> >>> protected AbstractXmlApplicationContext createBeanFactory() { >> >>> return new ClassPathXmlApplicationContext("jms-boot-xbean.xml >> "); >> >>> } >> >>> } >> >>> >> >>> >> >>> >> >>> Here's the output of the test: >> >>> >> >>> Test set: com.raytheon.ap.emaf.test.JMSRegisterCapabilityTest >> >>> >> >>> >> ------------------------------------------------------------------------------- >> >>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.247 >> >>> sec >> >>> <<< FAILURE! >> >>> testBoot(com.raytheon.ap.emaf.test.JMSRegisterCapabilityTest) Time >> >>> elapsed: >> >>> 0.235 sec <<< ERROR! >> >>> org.springframework.beans.factory.BeanCreationException: Error >> creating >> >>> bean >> >>> with name 'broker' defined in class path resource [jms-boot-xbean.xml >> ]: >> >>> Initialization of bean failed; nested exception is >> >>> org.springframework.beans.factory.BeanDefinitionStoreException: >> >>> Unrecognized >> >>> Spring element: broker >> >>> org.springframework.beans.factory.BeanDefinitionStoreException: >> >>> Unrecognized >> >>> Spring element: broker >> >>> at >> >>> >> >>> >> org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement >> >>> (XBeanXmlBeanDefinitionParser.java:173) >> >>> at >> >>> >> >>> >> org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanDefinitions >> >>> (XBeanXmlBeanDefinitionParser.java:750) >> >>> at >> >>> >> >>> >> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions >> >>> (DefaultXmlBeanDefinitionParser.java:191) >> >>> at >> >>> >> >>> >> org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.registerBeanDefinitions >> >>> (XBeanXmlBeanDefinitionReader.java:78) >> >>> at >> >>> >> >>> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions >> >>> (XmlBeanDefinitionReader.java:223) >> >>> at >> >>> >> >>> >> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions >> >>> (XmlBeanDefinitionReader.java:173) >> >>> ... >> >>> >> >>> Any ideas? >> >>> -- >> >>> View this message in context: >> >>> >> http://www.nabble.com/Problem-Embedding-SM-w--Broker...-t1820993.html#a4965510 >> >>> Sent from the ServiceMix - User forum at Nabble.com. >> >>> >> >>> >> >> >> >> >> > >> -- >> View this message in context: >> http://www.nabble.com/Problem-Embedding-SM-w--Broker...-t1820993.html#a4977127 >> Sent from the ServiceMix - User forum at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Problem-Embedding-SM-w--Broker...-t1820993.html#a5013507 Sent from the ServiceMix - User forum at Nabble.com.
