Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1762

No namespace handler for http://www.springframework.org/schema/beans

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Blueprint
    • Labels:
      None

      Description

      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:

      <?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>
      

      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:

      15:42:34,944 INFO  [fileinstall-/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]
      

      And this is what I get when I try to inspect services from apache gogo console:

      
      inspect capability service 617
      sample-impl_1.0.0 [617] provides:
      ---------------------------------------------------
      service [EMPTY]
      

      These are the versions on Apache Aries I'm using:

      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
      

      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oscar.rodriguez Oscar Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: