Hello All,

After having successfully developed and tested a custom binding component, I am now trying to use a simple XML configuration file instead of the original SU and SA. I am stuck on the following error each time I copy the XML file (cf attached file) in the hot deploy directory : First, "Exception in thread "SpringOsgiExtenderThread-46" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext" appears in the console. Displaying logs, I notice "org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean namespace mapping: http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0";

Listing the corresponding OSGI service, I can see the namespace :
vSphere Binding Component (629) provides:
----------------------------------------------------------------------------
osgi.service.blueprint.namespace = http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0
objectClass = org.apache.aries.blueprint.NamespaceHandler
service.id = 444

I did not notice any difference between my custom binding component (attached pom and blueprint files) and the servicemix-http component, except for the namespace being declared in the Export-Service section of the Manifest file in servicemix-http (I do not have this section in the Manifest file of the custom component). Could it be really linked to the issue ?

Any hint would be greatly appreciated.

Regards,
 - emmanuel

--
Ingénieur études et développements
Intrinsec
215, avenue Georges Clemenceau
92000 Nanterre
http://www.intrinsec.com





Emmanuel GUITON

Ingénieur développement Standard : +33 1 41 91 77 77 l Fax : +33 1 41 91 77 78

215, avenue Georges Clemenceau l 92024 NANTERRE
http://infogerance.intrinsec.com/2010/04/informatique-de-lunicef-un-cloud-au-secours-dhaiti.html
http://www.intrinsec.com/


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:vsbc="http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0";
       xmlns:vsp="com.intrinsec.esb.vmware.vsphere"
       xmlns:erp="com.intrinsec.esb.erp4it"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans                 http://www.springframework.org/schema/beans/spring-beans.xsd
          http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0   http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0/vsphere-bc.xsd";
          >
	<vsbc:provider service="vsp:alpha" endpoint="provider">
		<property name="address" value="192.168.2.237" />
		<property name="login" value="root" />
		<property name="password" value="k00l1x$$" />
		<property name="erp4itEndpoint" value="provider" />
		<property name="erp4itService" value="erp:erp4it" />
		<property name="erp4itElementIdMap">
			<map>
				<entry key="176"><value>1786860185</value></entry>
				<!--entry key="176"><value>1068744886</value></entry-->
			</map>
		</property>
	</vsbc:provider>
	<!-- Export this service assembly to the OSGi registry -->
	<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0";>
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.intrinsec.esb.components</groupId>
		<artifactId>vmware</artifactId>
		<version>1.0</version>
	</parent>

	<groupId>com.intrinsec.esb.components.vmware</groupId>
	<artifactId>vsphere-bc</artifactId>
	<version>1.0</version>
	<packaging>jbi-component</packaging>
	<name>Intrinsec Service Bus :: VMWare :: vSphere Binding Component</name>

	<dependencies>
		<dependency>
			<groupId>com.intrinsec.esb</groupId>
			<artifactId>utils</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>com.intrinsec.esb.components</groupId>
			<artifactId>erp4it</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>com.intrinsec.esb.tools</groupId>
			<artifactId>com.vmware.vijava</artifactId>
			<version>2120100824</version>
		</dependency>
		<dependency>
			<groupId>com.intrinsec.esb.tools</groupId>
			<artifactId>com.trazere.utils</artifactId>
			<version>${trazere-version}</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>${commons-logging-version}</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jta_1.1_spec</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.servicemix</groupId>
			<artifactId>servicemix-core</artifactId>
			<version>${servicemix-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.servicemix</groupId>
			<artifactId>servicemix-common</artifactId>
			<version>${servicemix-shared-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.servicemix</groupId>
			<artifactId>servicemix-shared</artifactId>
			<version>${servicemix-shared-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.servicemix.specs</groupId>
			<artifactId>org.apache.servicemix.specs.jbi-api-1.0</artifactId>
			<version>${servicemix-specs-version}</version>
		</dependency>
	</dependencies>

	<build>
		<defaultGoal>install</defaultGoal>
		<plugins>
			<plugin>
				<groupId>com.sun.tools.xjc.maven2</groupId>
				<artifactId>maven-jaxb-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<instructions>
						<Bundle-Name>${project.name}</Bundle-Name>
						<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
						<Require-Bundle>
							org.springframework.core,
							org.springframework.beans,
							org.springframework.context
						</Require-Bundle>
						<Import-Package>
							!com.intrinsec.esb.components.vmware.vsphere.*,
							org.apache.servicemix.common,
							org.apache.xbean.spring.context.v2,
							org.springframework.beans.factory.xml,
							*
						</Import-Package>
						<!-- <DynamicImport-Package>javax.*, org.w3c.*, org.xml.*</DynamicImport-Package> -->
						<Export-Package>
							com.intrinsec.esb.components.vmware.vsphere.*;version=${project.version},
							META-INF.services.org.apache.xbean.spring.http.esb.intrinsec.com/components/vmware/vsphere-bc
						</Export-Package>
						<_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders>
						<Export-Service>
							javax.jbi.component.Component;NAME=vsphere-bc;TYPE=service-engine,
							org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://esb.intrinsec.com/components/vmware/vsphere-bc/${project.version}";
						</Export-Service>
					</instructions>
					<unpackBundle>true</unpackBundle>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<useDefaultManifestFile>true</useDefaultManifestFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.servicemix.tooling</groupId>
				<artifactId>jbi-maven-plugin</artifactId>
				<configuration>
					<type>binding-component</type>
					<component>com.intrinsec.esb.components.vmware.vsphere.VSphereComponent</component>
					<generatedDescriptorLocation>${project.build.directory}/jbi</generatedDescriptorLocation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.xbean</groupId>
				<artifactId>maven-xbean-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>mapping</goal>
						</goals>
						<configuration>
							<namespace>http://esb.intrinsec.com/components/vmware/vsphere-bc/${project.version}</namespace>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";>
	<bean id="component" class="com.intrinsec.esb.components.vmware.vsphere.VSphereComponent">
		<property name="executorFactory" ref="executorFactory" />
	</bean>

	<bean id="executorFactory" class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
		<property name="defaultConfig">
			<bean class="org.apache.servicemix.executors.impl.ExecutorConfig">
				<property name="corePoolSize" value="${threadPoolCorePoolSize}" />
				<property name="maximumPoolSize" value="${threadPoolMaximumPoolSize}" />
				<property name="queueSize" value="${threadPoolQueueSize}" />
			</bean>
		</property>
	</bean>

	<bean id="endpoint-tracker" class="org.apache.servicemix.common.osgi.EndpointTracker">
		<property name="component" ref="component" />
	</bean>

	<reference-list id="endpoints" interface="org.apache.servicemix.common.osgi.EndpointWrapper" availability="optional">
		<reference-listener ref="endpoint-tracker" bind-method="register" unbind-method="unregister" />
	</reference-list>

	<service id="service" ref="component" interface="javax.jbi.component.Component">
		<service-properties>
			<entry key="NAME" value="vsphere-bc" />
			<entry key="TYPE" value="service-engine" />
		</service-properties>
	</service>

	<service interface="org.apache.aries.blueprint.NamespaceHandler">
		<service-properties>
			<entry key="osgi.service.blueprint.namespace" value="http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0"; />
		</service-properties>
		<bean class="org.apache.xbean.blueprint.context.impl.XBeanNamespaceHandler">
			<argument value="http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0"; />
			<argument value="vsphere-bc.xsd" />
			<argument ref="blueprintBundle" />
			<argument value="META-INF/services/org/apache/xbean/spring/http/esb.intrinsec.com/components/vmware/vsphere-bc/1.0" />
		</bean>
	</service>

	<cm:property-placeholder persistent-id="com.intrinsec.esb.components.vmware.vsphere.vsphere-bc">
		<cm:default-properties>
			<cm:property name="threadPoolCorePoolSize" value="8" />
			<cm:property name="threadPoolMaximumPoolSize" value="32" />
			<cm:property name="threadPoolQueueSize" value="256" />
		</cm:default-properties>
	</cm:property-placeholder>
</blueprint>

Reply via email to