You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Happy User <ha...@gmail.com> on 2014/06/09 20:23:28 UTC
Issue - waiting for namespace handlers [http://www.springframework.org/schema/osgi]
Tried to expose activemq as OSGI service in activemq.xml and tried to
reference it in blueprint. But I am getting the waiting for namespace
issue. Have the spring-osgi.* jars in maven dependencies already.
blueprint.xml:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://camel.apache.org/schema/blueprint/cxf
http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
<osgi:reference id="activemq" interface="org.apache.camel.Component"
filter="(component=activemq)"/>
<camelContext trace="false" id="blueprintContext" xmlns="
http://camel.apache.org/schema/blueprint">
<route>
<from uri="file:camel/input"/>
<log message="Moving ${file:name} to the output directory"/>
<to uri="file:camel/output"/>
</route>
</camelContext>
</blueprint>
activemq.xml:
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent" >
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="vm://localhost?create=false&waitForStart=10000" />
<property name="userName" value="system"/>
<property name="password" value="manager"/>
</bean>
</property>
</bean>
<service ref="activemq" interface="org.apache.camel.Component"/>
pom.xml:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Import-Package>
org.apache.activemq.camel.component,
org.apache.camel,
*</Import-Package>
<Include-Resource>src/main/resources</Include-Resource>
<Spring-Context>*;publish-context:=false;create-asynchronously:=true</Spring-Context>
<Private-Package></Private-Package>
</instructions>
</configuration>
</plugin>
-Thanks
Re: Issue - waiting for namespace handlers
[http://www.springframework.org/schema/osgi]
Posted by Willem Jiang <wi...@gmail.com>.
Spring-DM is out of support for years. You can use blueprint to do the same thing as you do in spring-DM. So I suggest you to publish the activemq component service by using blueprint instead of Spring.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On June 10, 2014 at 2:23:54 AM, Happy User (happyuser828612@gmail.com) wrote:
> Tried to expose activemq as OSGI service in activemq.xml and tried to
> reference it in blueprint. But I am getting the waiting for namespace
> issue. Have the spring-osgi.* jars in maven dependencies already.
>
> blueprint.xml:
>
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
> xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
> xmlns:osgi="http://www.springframework.org/schema/osgi"
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
> "
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> http://camel.apache.org/schema/blueprint/cxf
> http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
> http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd
> http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd">
>
> > filter="(component=activemq)"/>
>
>
>
>
>
>
>
>
>
>
>
>
> activemq.xml:
>
> > class="org.apache.activemq.camel.component.ActiveMQComponent" >
>
>
> > value="vm://localhost?create=false&waitForStart=10000" />
>
>
>
>
>
>
>
> pom.xml:
>
>
> org.apache.felix
> maven-bundle-plugin
> 2.3.4
> true
>
> META-INF
>
>
> ${pom.artifactId}
>
> org.apache.activemq.camel.component,
> org.apache.camel,
> *
>
> src/main/resources
>
> *;publish-context:=false;create-asynchronously:=true
>
>
>
>
>
> -Thanks
>
Re: Issue - waiting for namespace handlers [http://www.springframework.org/schema/osgi]
Posted by Aki Yoshida <el...@gmail.com>.
you are mixing the spring stuff with blueprint. As a result, it ends
up incorrectly looking up the spring osgi namespace handler.
you have to use the reference element from the blueprint namespace instead.
regards, aki
2014-06-09 20:23 GMT+02:00 Happy User <ha...@gmail.com>:
> Tried to expose activemq as OSGI service in activemq.xml and tried to
> reference it in blueprint. But I am getting the waiting for namespace
> issue. Have the spring-osgi.* jars in maven dependencies already.
>
> blueprint.xml:
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
> xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
> xmlns:osgi="http://www.springframework.org/schema/osgi"
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
> "
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> http://camel.apache.org/schema/blueprint/cxf
> http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
> http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd
> http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd">
>
> <osgi:reference id="activemq" interface="org.apache.camel.Component"
> filter="(component=activemq)"/>
>
> <camelContext trace="false" id="blueprintContext" xmlns="
> http://camel.apache.org/schema/blueprint">
>
> <route>
> <from uri="file:camel/input"/>
> <log message="Moving ${file:name} to the output directory"/>
> <to uri="file:camel/output"/>
> </route>
>
> </camelContext>
> </blueprint>
>
> activemq.xml:
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent" >
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL"
> value="vm://localhost?create=false&waitForStart=10000" />
> <property name="userName" value="system"/>
> <property name="password" value="manager"/>
> </bean>
> </property>
> </bean>
> <service ref="activemq" interface="org.apache.camel.Component"/>
>
> pom.xml:
>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>2.3.4</version>
> <extensions>true</extensions>
> <configuration>
> <manifestLocation>META-INF</manifestLocation>
> <instructions>
>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Import-Package>
> org.apache.activemq.camel.component,
> org.apache.camel,
> *</Import-Package>
>
> <Include-Resource>src/main/resources</Include-Resource>
>
> <Spring-Context>*;publish-context:=false;create-asynchronously:=true</Spring-Context>
> <Private-Package></Private-Package>
> </instructions>
> </configuration>
> </plugin>
>
> -Thanks