Oscar Rodriguez created ARIES-1762:
--------------------------------------
Summary: No namespace handler for
http://www.springframework.org/schema/beans
Key: ARIES-1762
URL: https://issues.apache.org/jira/browse/ARIES-1762
Project: Aries
Issue Type: Bug
Reporter: Oscar Rodriguez
Hi guys,
I was trying to bundle an Spring Integration app under an OSGI container using
blueprints but so far I haven't been able to do so.
My bet was to use Apache Aries with the Spring module so after searching for
this topic on the web I tried something similar to what it's found in
http://svn.apache.org/viewvc/aries/trunk/blueprint/itests/blueprint-testbundles/
as a proof on concept.
My setup is simple, all I'm trying to do is to define a bean within spring, and
exporting it as a OSGI service. No springt integration yet. So my blueprint.xml
looks like:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:bean="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
<annotation-driven xmlns="http://www.springframework.org/schema/tx"/>
<bean:bean class="com.demo.impl.SampleImpl" id="sampleImpl" />
<service ref="sampleImpl" id="sampleImpl.service"
interface="com.demo.api.Sample"/>
</blueprint>
{code}
Bundle is created with gradle with both spring-context and spring-tx
dependencies: Same as on the "blueprint-testbundles" project. However for some
reason service is not getting registered.
This is what im getting after deploying the bundle:
{code:java}
15:42:34,944 INFO
[fileinstall-/Users/oscar.rodriguez/projects/hkp/hauni-customer-portal/bundles/osgi/modules][BundleStartStopLogger:35]
STARTED sample-impl_1.0.0 [617]
15:42:34,944 INFO [Blueprint Extender: 1][BlueprintContainerImpl:324] Bundle
sample-impl/1.0.0 is waiting for namespace handlers
[http://www.springframework.org/schema/beans]
{code}
And this is what I get when I try to inspect services from apache gogo console:
{code:java}
inspect capability service 617
sample-impl_1.0.0 [617] provides:
---------------------------------------------------
service [EMPTY]
{code}
These are the versions on Apache Aries I'm using:
{code:java}
org.apache.aries.blueprint.annotation.api-1.0.1.jar
org.apache.aries.blueprint.api-1.0.1.jar
org.apache.aries.blueprint.cm-1.1.0.jar
org.apache.aries.blueprint.core-1.8.3.jar
org.apache.aries.blueprint.spring-0.5.0.jar
org.apache.aries.proxy-1.0.1.jar
org.apache.aries.util-1.1.3.jar
{code}
All of them are shown as active on the OSGI container. Shouldn't the
apache.aries.blueprint.spring be registered
http://www.springframework.org/schema/beans as namespace handler?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)