Hello,
I'm getting an error "A kernel is already registered with the name
servicemix-file/merchant-su-file6" - a little help would be appreciated.
Below please find the error and the servicemix.xml file I'm testing
The error happens in the test bean on line 146 - which is .....
testContext = new ClassPathXmlApplicationContext(
"testservicemix.xml" );
---------- Error ---------------
<loc-message>Unable to deploy service unit</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token/>
<loc-message>A kernel is already
registered with the name
servicemix-file/merchant-su-file6</loc-message>
<stack-trace><![CDATA[org.apache.xbean.kernel.KernelAlreadyExistsException:
A kernel is already registered with the name
servicemix-file/merchant-su-file6
at
org.apache.xbean.kernel.KernelFactory.createKernel(KernelFactory.java:175)
at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:65)
at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
at
org.apache.servicemix.jbi.framework.DeploymentService.deploy(DeploymentService.java:206)
at
org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:212)
at
org.apache.servicemix.jbi.container.DeployServiceAssembly.doDeploy(DeployServiceAssembly.java:57)
at
org.apache.servicemix.jbi.container.DeploySupport.deploy(DeploySupport.java:58)
at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:111)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
at adc.grs.ServiceMixClientTest.setUp(ServiceMixClientTest.java:146)
--------------- testservicemix.xml -------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:grs="urn:meridian:grs"
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://incubator.apache.org/servicemix/schema/core/servicemix-core.xsd"
>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>**/adc.servicemix.grs.merchant.properties</value>
</list>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<sm:container
id="testjbi"
generateRootDir="true"
createJmxConnector="false"
>
<!--
| Include Service Assemble to test
+-->
<sm:deployments>
<sm:installSharedLibrary groupId="org.apache.servicemix"
artifactId="servicemix-shared" version="3.2.1" />
<sm:installComponent groupId="org.apache.servicemix"
artifactId="servicemix-file" version="3.2.1" />
<sm:deployServiceAssembly groupId="meridian"
artifactId="merchant-sa5" version="0.5.2-SNAPSHOT" />
</sm:deployments>
<!--
| Create a test file on the fly.
+-->
<sm:activationSpecs>
<sm:activationSpec
componentName="grs:testMoveXmlFileForProcessingComponentName"
service="grs:testMoveXmlFileForProcessingServiceName"
>
<sm:component>
<bean
class="org.apache.servicemix.components.xslt.XsltComponent">
<property name="xsltResource"
value="classpath:Merchant3.0.xslt"/>
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec
componentName="grs:testWriteXmlFileForProcessingComponentName"
service="grs:testWriteXmlFileForProcessingServiceName"
>
<sm:component>
<bean
class="org.apache.servicemix.components.file.FileWriter">
<property name="directory"
value="${filepoller.directory}" />
<property name="marshaler">
<bean
class="org.apache.servicemix.components.util.DefaultFileMarshaler">
<property name="fileName">
<bean
class="org.apache.servicemix.expression.JaxenStringXPathExpression">
<constructor-arg
value="'Merchant3.0.xml'" />
</bean>
</property>
</bean>
</property>
</bean>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
<!--
| testClient to be used within the test bean.
+-->
<bean id="testClient"
class="org.apache.servicemix.client.DefaultServiceMixClient">
<constructor-arg ref="testjbi" />
</bean>
</beans>
--
View this message in context:
http://www.nabble.com/A-kernel-is-already-registered-with-the-name-servicemix-file-merchant-su-file6-tp17257711p17257711.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.