You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by boday <bo...@vektrel.com> on 2009/08/12 05:56:28 UTC

itest failing with servicemix-camel component

Is there some trick to running an itest for an SA that contains a
servicemix-camel SU?  I keep getting this error...

ApplicationEventMulticaster not initialized - call 'refresh' before
multicasting events via the context:
org.springframework.context.support.GenericApplicationContext@1bd9de3:
display name
[org.springframework.context.support.GenericApplicationContext@1bd9de3];
startup date [Wed Dec 31 16:00:00 PST 1969]; root of context hierarchy

...

I'm trying to setup a very simple itest by following the bridge-sa-itest
example.  I have an SA that has a servicemix-camel component to route
inbound http traffic to a servicemix-bean component, then to an outbound
servicemix-jms topic provider.

Long story short, I get an error when I run the itest whenever I include the
servicemix-camel SU...if its omitted from the SA, the error goes away.  Is
there some dependency that I'm missing or a version issue?  I'm using SMX
3.3.1 (3.2.3 smx components) and Camel 1.6.1.

here is my integrationTest.xml file...

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sm="http://servicemix.apache.org/config/1.0"
	xmlns:nf="http://www.test.com/eda"
	xsi:schemaLocation="
         http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
         http://servicemix.apache.org/config/1.0
http://repo2.maven.org/maven2/org/apache/servicemix/servicemix-core/3.2.3/servicemix-core-3.2.3.xsd 
         http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/activemq-core.xsd
         http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

	<!-- Run a local ActiveMQ broker for testing -->
	<broker xmlns="http://activemq.apache.org/schema/core"
		brokerName="localhost" persistent="true">
		<transportConnectors>
			<transportConnector name="openwire" uri="tcp://localhost:61616" />
		</transportConnectors>
	</broker>

	<!-- Deploy artifacts in ServiceMix -->
	<sm:container createJmxConnector="false">
		<sm:deployments>
			<sm:installSharedLibrary groupId="org.apache.servicemix"
				artifactId="servicemix-shared" version="3.2.3" />
			<sm:installComponent groupId="org.apache.servicemix"
				artifactId="servicemix-jms" version="3.2.3" />
			<sm:installComponent groupId="org.apache.servicemix"
				artifactId="servicemix-bean" version="3.2.3" />
			<sm:installComponent groupId="org.apache.servicemix"
				artifactId="servicemix-camel" version="3.2.3" />
			<sm:deployServiceAssembly groupId="com.test.eda.message-processor"
				artifactId="message-processor-sa" version="0.1-SNAPSHOT" />
		</sm:deployments>
	</sm:container>

and the test result...

-------------------------------------------------------------------------------
Test set: com.test.eda.messageprocessor.test.IntegrationTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 18.266 sec
<<< FAILURE!
testDeploy(com.test.eda.messageprocessor.test.IntegrationTest)  Time
elapsed: 18.031 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicemix.jbi.container.SpringJBIContainer#0' defined
in class path resource [integrationTest.xml]: Invocation of init method
failed; nested exception is java.lang.Exception: <?xml version="1.0"
encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
	<component-name>servicemix-jms</component-name>
	<component-task-result-details>
		<task-result-details>
			<task-id>deploy</task-id>
			<task-result>SUCCESS</task-result>
		</task-result-details>
	</component-task-result-details>
</component-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
	<component-name>servicemix-camel</component-name>
	<component-task-result-details>
		<task-result-details>
			<task-id>deploy</task-id>
			<task-result>FAILED</task-result>
			<message-type>ERROR</message-type>
			<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Could not deploy xbean service unit</loc-message>
</msg-loc-info>
</task-status-msg>
			<exception-info>
				<nesting-level>1</nesting-level>
				<msg-loc-info>
					<loc-token/>
					<loc-message>ApplicationEventMulticaster not initialized - call
'refresh' before multicasting events via the context:
org.springframework.context.support.GenericApplicationContext@1bd9de3:
display name
[org.springframework.context.support.GenericApplicationContext@1bd9de3];
startup date [Wed Dec 31 16:00:00 PST 1969]; root of context
hierarchy</loc-message>
					<stack-trace><![CDATA[java.lang.IllegalStateException:
ApplicationEventMulticaster not initialized - call 'refresh' before
multicasting events via the context:
org.springframework.context.support.GenericApplicationContext@1bd9de3:
display name
[org.springframework.context.support.GenericApplicationContext@1bd9de3];
startup date [Wed Dec 31 16:00:00 PST 1969]; root of context hierarchy
	at
org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:287)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
	at
org.springframework.context.support.AbstractApplicationContext.start(AbstractApplicationContext.java:1032)
	at
org.apache.servicemix.camel.CamelSpringDeployer.createParentApplicationContext(CamelSpringDeployer.java:135)
...

Any ideas?



-----
Ben - Senior Consultant

-- 
View this message in context: http://www.nabble.com/itest-failing-with-servicemix-camel-component-tp24929609p24929609.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.