2 Replies Latest reply on Apr 17, 2014 7:39 AM by rahul vashishth

    OSGi Admin Service Configuration - not deploying in Fuse IDE

    rahul vashishth Novice


      I am trying to implement the OSGi admin service configuration as explained in the below link..

      Issue with mine is that i am able to deploy on redhat-fuse-standalone-server but when i run my camel context in

      fuse ide, it is not able to start there saying namespace not found exception


      Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/osgi-compendium]

      Offending resource: class path resource [META-INF/spring/UserProfileSpringContext.xml]



      I have modified the osgi admin config accordingly..

      Below my configuration ---


      My Bean configuration file


      <beans xmlns="http://www.springframework.org/schema/beans"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"

















          <!-- Configuration Admin entry -->

          <osgix:cm-properties id="cmProps"


            <prop key="portNumber">10226</prop>



          <!-- placeholder configurer -->

          <ctx:property-placeholder properties-ref="cmProps" />


        <cxf:rsServer id="userProfileService"





                  <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>





      in POM file i have added the following dependency







      My camel file has imported the bean configuration file.

      Now when i deploy this into a standalone redhat-jboss-fuse-server it is working fine.

      But after this i am not able to run it into my fuse ide. Is there any jar i am missing.

      Please help me on this.

        • 1. Re: OSGi Admin Service Configuration - not deploying in Fuse IDE
          Claus Ibsen Master

          You cannot run everything from within Fuse IDE.


          As you are using spring xml that are using OSGi compendium, eg you have it in the xml declaration etc, then the spring xml files is now depent on OSGi. And this cannot run outside the real OSGi container. And therefore you cannot run it in Fuse IDE.


          If the Spring XML file has no OSGi dependencies, then its just a regular spring xml file, and you can run it from Fuse IDE.


          If you use OSGi blueprint, then you can run it from Fuse IDE as well, as we use a little simulated OSGi environment called pojosr (though its not a full fledge OSGi container, so some advanced osgi stuff is not possible) and that supports osgi compendium and using osgi placeholders, which you can run from Fuse IDE as well.

          • 2. Re: OSGi Admin Service Configuration - not deploying in Fuse IDE
            rahul vashishth Novice

            Thanks, I understand,

            I am having one more issue regarding the use of "OSGi Config Admin Services". As per the docs i have created a cfg file in Fuse_Home/etc directory. and trying to load that by providing the cfg file name in persistence-id of osgix:cm-properties tag, now i restarted my server and child containers but its not loading the property from the cfg file.

            I am able to read the properties only if add the property file in Fuse Management Console > Profiles > Config Files. But my requirement is to have a centralized property config file at server level so i can share the data_src and other properties across all my child containers and profiles.