Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Issue with using Spring inside an OSGI Bundle Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with using Spring inside an OSGI Bundle

    I've implemented few Spring beans inside an existing OSGI Bundle. I've added the folder containing the spring configuration file into classpath. However during runtime, the Spring Config file is not getting read, getting FileNotFoundException there. Could someone please help ?

    Spring context Fie (billing_app_context.xml) present under "resources" folder.

    MANIFEST.MF Entry : Bundle-ClassPath: .,resources/

    Code to read config file
    ---------------------------------
    public static void loadSpringConfig() {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("billing_app_contex t.xml")
    {
    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader)
    {
    super.initBeanDefinitionReader(reader);
    reader.setValidationMode(XmlBeanDefinitionReader.V ALIDATION_NONE);
    reader.setBeanClassLoader(getClassLoader());
    }
    };
    }
    Last edited by ironman; Oct 30th, 2013, 03:09 PM.
Working...
X