Hi,
I do have the Aries Blueprint bundle. Here is an extract from osgi:list :
[ 7] [Active ] [Created ] [ ] [ 20] Apache Aries
Blueprint Bundle (0.1.0.r964701)
I have also a lot of Spring bundles but I do not see any spring-dm
amongst them, so I guess it is not installed.
See the attached files for the component POM and the vsphere-bc.xml
The section for the service interface is as follow :
<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>
Regards,
- emmanuel
On 11/15/2010 10:30 AM, Jean-Baptiste Onofré wrote:
OK,
and could you provide:
- your component pom including OSGi statements
- your resources/OSGI-INF/blueprint/component.xml
especially the section around <service
interface="org.apache.aries.blueprint.NamespaceHandler">
You should define your namespace in this section.
Could you check that spring-dm is not installed in your SMX startup ?
It should be the Aries blueprint provider (not the spring-dm one).
Regards
JB
On 11/15/2010 10:21 AM, Emmanuel Guiton wrote:
Hi Jean-Baptiste,
I did. Here is my vsphere-1.0.xml (I am trying to use a simple XML
configuration file through hot deployment) :
<?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>
Thanks,
- emmanuel
On 11/15/2010 10:19 AM, Jean-Baptiste Onofré wrote:
Hi Emmanuel,
Did you add the EndpointExporter in the xbean.xml deployed in the
deploy directory ?
Could you provided your xbean.xml ?
Thanks
Regards
JB
On 11/15/2010 10:12 AM, Emmanuel Guiton wrote:
Hello,
Thanks, but your modifications did not work out.
What could have been the problem in your idea ? What was your intent ?
It may provide a clue.
Thanks,
- emmanuel
PS : here is the log of the "new" error I get :
10:08:49,707 | INFO | xtenderThread-14 |
OsgiBundleXmlApplicationContext
| pport.AbstractApplicationContext 456 | 60 -
org.springframework.context - 3.0.3.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=vsphere,
config=osgibundle:/META-INF/spring/*.xml): startup date [Mon Nov 15
10:08:49 CET 2010]; root of context hierarchy
10:08:49,707 | INFO | xtenderThread-14 |
OsgiBundleXmlApplicationContext
| ractOsgiBundleApplicationContext 359 | 60 -
org.springframework.context - 3.0.3.RELEASE | Unpublishing application
context OSGi service for bundle null (vsphere)
10:08:49,709 | INFO | xtenderThread-14 | XmlBeanDefinitionReader |
tory.xml.XmlBeanDefinitionReader 315 | 59 -
org.springframework.beans -
3.0.3.RELEASE | Loading XML bean definitions from URL
[bundleentry://637.fwk1083228271/META-INF/spring/vsphere-1.0.xml]
10:08:49,727 | ERROR | xtenderThread-14 | ContextLoaderListener |
BundleApplicationContextListener 50 | 72 -
org.springframework.osgi.extender - 1.2.0 | Application context
refresh
failed (OsgiBundleXmlApplicationContext(bundle=vsphere,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean namespace mapping:
http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0
at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:282)[110:org.apache.xbean.spring:3.7]
at
org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:156)[110:org.apache.xbean.spring:3.7]
at
org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)[110:org.apache.xbean.spring:3.7]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[59:org.springframework.beans:3.0.3.RELEASE]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[60:org.springframework.context:3.0.3.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[60:org.springframework.context:3.0.3.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)[72:org.springframework.osgi.extender:1.2.0]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)[72:org.springframework.osgi.extender:1.2.0]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[71:org.springframework.osgi.core:1.2.0]
at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)[72:org.springframework.osgi.extender:1.2.0]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
On 11/14/2010 08:39 AM, SMS Chauhan wrote:
I am not sure if this will help you, but please try modifying your
maven-bundle-plugin configuration. The configuration below should
be a
little more accommodating.
<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>
<Import-Package>
!com.intrinsec.esb.components.vmware.vsphere.*,
*;resolution:=optional
</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Embed-Dependency>*;scope=(compile|runtime)<Embed-Dependency>
<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</_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>
Thanks,
SMS Chauhan
On Tue, Nov 9, 2010 at 11:39 PM, Emmanuel Guiton<
[email protected]> wrote:
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/
--
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"?>
<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>