Hi, The last part of xsi:schemaLocation isn't correct http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd
remove the http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd Freeman ------------- Freeman Fang FuseSource Email:[email protected] Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: http://weibo.com/u/1473905042 On 2012-7-18, at 下午1:41, Kumar Mahadevan wrote: > I am getting the following exception when using osgi:reference. I have > defined the following namespaces in the beans.xml. LoggingService is a pojo > exposed as an OSGI service > > I am using Service mix 4.4.1. > > Pls advice. > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:osgi="http://www.springframework.org/schema/osgi" > xmlns:cxf="http://camel.apache.org/schema/cxf" > xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://servicemix.apache.org/cxfse/1.0 > http://www.springframework.org/schema/osgi > http://www.springframework.org/schema/osgi/spring-osgi.xsd > > http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd"> > > > > > <osgi:reference id="logger" > interface="com.exceptionmanagement.logging.service.LoggingService"/> > > <bean id="testosgi" > class="com.exceptionmanagement.process.TestBean" > init-method="init"> > > <property name="loggingService" ref="logger"/> > </bean> > </beans> > > 16:38:02,543 | ERROR | xtenderThread-12 | WaiterApplicationContextExecutor | > 78 - org.springframework.osgi.extender - 1.2.1 | Unable to create > application context for [wsdl-first-cxfse-bundle], unsatisfied dependencies: > none > org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line > 65 in XML document from URL [bundle://532.0:0/META-INF/spring/beans.xml] is > invalid; nested exception is org.xml.sax.SAXParseException: > cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration > can be found for element 'osgi:reference'. > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[67:org.springframework.beans:3.0.5.RELEASE] > at > org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[69:org.springframework.context:3.0.5.RELEASE] > at > org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[69:org.springframework.context:3.0.5.RELEASE] > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[78:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[78:org.springframework.osgi.extender:1.2.1] > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[75:org.springframework.osgi.core:1.2.1] > at > org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[78:org.springframework.osgi.extender:1.2.1] > at java.lang.Thread.run(Thread.java:619)[:1.6.0_21] > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/SAX-parser-exception-when-using-osgi-reference-tp5713909.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
