Hi,

I am using Karaf 3.0.2 and trying to deploy a KAR-archived application that
uses Spring 4.0.2. My bundles contain Spring configuration files with the
following property placeholder resolver configurations:

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:ctx="http://www.springframework.org/schema/context";
       xmlns:osgi-springdm="http://www.springframework.org/schema/osgi";
       xmlns:jee="http://www.springframework.org/schema/jee";
       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium";
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
       http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
       http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
       http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd";>


    
    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="propertiesArray">
            <array>
                <osgix:cm-properties id="healthedge.prototype"
persistent-id="prototype"/>

                <osgix:cm-properties id="my.props.one"
persistent-id="props.one"/>
                <osgix:cm-properties id="my.props.two"
persistent-id="props.two"/>
            </array>
        </property>
    </bean>
...
</beans>

In Karaf, I ensure that the Spring (v 4.0.2.RELEASE_1) and spring-dm (v.
1.2.1) features are installed/activated. I even tried explicitly
uninstalling Spring 3.2.4.RELEASE. However, I am always getting the
following exceptions when deploying the KAR file:


Offending resource: URL
[bundle://126.0:0/META-INF/spring/my-bundleX-context.xml]
Bean ''; nested exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML
schema namespa
mework.org/schema/osgi-compendium]
Offending resource: URL
[bundle://126.0:0/META-INF/spring/prototype-filepoller-context.xml]
Bean ''
        -> Property 'propertiesArray'
        at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:325)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:581)[112:org.springframework.beans:*3.2.4.RELEASE*]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:479)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:448)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.processBeanDefinition(DefaultBeanDefinitionDocumentReader.java:312)[112:org.springframework.beans:3.2.4.
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:203)[112:org.springframework.beans:3.2.4.RE
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:182)[112:org.springframework.beans:3.2.4.R
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)[112:org.springframework.beans:3.
        at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)[112:org.springframework.beans:3.2.
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[118:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[118:org.springframework.osgi.core:1.2.1]
        at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[114:org.springframework.context:3.2.4
        at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[114:org.springframework.context:3.2.4.RELEASE]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[118:org.springframework.osg
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[118:org.springframework.osgi.co
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[118:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[118:org.springframework.
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[119:org.s
nder:1.2.1]
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[119:org.sp
der:1.2.1]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[118:org.springframework.osgi.
        at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[119:org.springframework.osgi.extender:1.2.1]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_55]
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://www.spr
osgi-compendium]
Offending resource: URL
[bundle://126.0:0/META-INF/spring/prototype-filepoller-context.xml]
Bean ''
        -> Property 'propertiesArray'
        at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:318)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1435)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1491)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:1045)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1229)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseArrayElement(BeanDefinitionParserDelegate.java:1191)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:1093)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:1033)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyValue(BeanDefinitionParserDelegate.java:1023)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElement(BeanDefinitionParserDelegate.java:921)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElements(BeanDefinitionParserDelegate.java:782)[112:org.springframework.beans:3.2.4.RELEASE]
        at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:566)[112:org.springframework.beans:3.2.4.RELEASE]


Note that the offending library is from the wrong version of Spring. What's
going on? I define all my spring and spring-osgi dependencies as "provided"
in my POM files. I activate the correct version of Spring. What causes the
problem? 

Thanks for any help! 



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Spring-4-0-2-and-spring-dm-tp4033093.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to