`
fox.tan
  • 浏览: 63273 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

解决Spring OSGi 中no declaration can be found for element 'oxm:jaxb2-marshaller'

阅读更多

又是一个老问题,没过多久差点忘记了。还是记录下来吧!

一个新建的bundle启动时出现一下错误:

Error
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'oxm:jaxb2-marshaller'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1955)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
... 18 more

 

这也算是Spring OSGi中一个诡异的问题。没有查阅过具体的文档,但调试了几次发现,如果dependency的bundle有schema定义,则这个bundle必须加到Eclipse/configuration/config.ini 显示的Start。上面的问题就是因为没有将oxm的bundle加入到config.ini中start。

分享到:
评论

相关推荐

    spring-osgi-1.2.0-rc1-with-dependencies.zip

    "spring-osgi-1.2.0-rc1"是Spring OSGi的一个早期版本,"RC1"代表Release Candidate 1,意味着这是正式发布前的最后一个测试版本。在这个版本中,开发者可以期待一些新特性和改进,但同时也可能存在一些未发现的...

    osgi-resource-locator-1.0.1-API文档-中文版.zip

    Maven坐标:org.glassfish.hk2:osgi-resource-locator:1.0.1; 标签:glassfish、osgi、resource、locator、hk2、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可...

    spring osgi相关资源

    2. spring-osgi-extender:实现了Spring DM的功能,使Spring应用能在OSGi环境中运行。 3. spring-osgi-io:提供I/O服务,如网络、文件系统访问等,适应OSGi的隔离环境。 4. 依赖库:包括了对Apache Felix或Equinox等...

    Spring Recipes: A Problem-Solution Approach, Second Edition

    This book provides elementary to advanced code recipes to account for the following, found in the new Spring 3: * Spring fundamentals: Spring IoC container, Spring AOP/ AspectJ, and more * Spring ...

    Spring OSGI 快速入门中文教程

    - **集成Spring**:引入Spring OSGi相关的库,如spring-osgi-core、spring-osgi-io等。 - **配置Bundle**:创建Manifest.MF文件,声明Bundle的依赖和其他元数据。 **4. 创建Spring OSGi Bundle** - **定义Bundle ...

    osgi-resource-locator-1.0.1-API文档-中英对照版.zip

    Maven坐标:org.glassfish.hk2:osgi-resource-locator:1.0.1; 标签:glassfish、osgi、resource、locator、hk2、jar包、java、API文档、中英对照版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”...

    spring-osgi-1.2.1-with-dependencies

    总结来说,“spring-osgi-1.2.1-with-dependencies”是一个集成了Spring与OSGi的完整包,它提供了在OSGi环境中运行Spring应用所需的所有组件和服务。通过理解和掌握这个包,开发者可以更好地利用OSGi的模块化优势,...

    spring osgi 中文

    - Spring中的核心模块化单元是applicationcontext,它包含了多个由Spring管理的对象(beans)。applicationcontexts可以分级配置,子applicationcontext可以看到其父级定义的beans。 - 在一个激活的bundle中可以包含...

    spring-osgi-1.2.1.rar

    Spring OSGi是Spring框架与OSGi(Open Service Gateway Initiative)规范相结合的产物,它允许在OSGi容器中使用和管理Spring应用。OSGi是一种Java模块化系统,它提供了动态部署、版本控制和依赖管理等功能,极大地...

    spring-osgi-1.2.0.zip

    标题"spring-osgi-1.2.0.zip"表明这是一个包含Spring OSGi 1.2.0版本的压缩包。这个版本可能包含了Spring框架与OSGi集成的相关库、文档、示例代码等资源,便于开发者在OSGi环境中使用Spring。 描述中提到"spring1.2...

    spring-osgi.jar及其依赖包

    Spring OSGi是Spring框架与OSGi(Open Service Gateway Initiative)规范集成的产物,它使得在OSGi环境中使用Spring变得更加方便。OSGi是一种模块化系统,用于Java应用程序,提供了动态服务发现、版本控制和依赖管理...

    spring-osgi-1.2.1-with-dependencies.zip

    spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip spring-osgi-1.2.1-with-dependencies.zip

    解决osgi spring 事务配置问题

    在OSGi(Open Service Gateway Initiative)环境中配置Spring的事务管理可能会遇到一些挑战,因为OSGi是一种模块化系统,它的动态性、服务发现和版本管理特性与传统的Java应用环境有所不同。这篇博客文章“解决osgi ...

    在Eclipse RCP中应用Spring OSGI 管理bean(一)

    标题中的“在Eclipse RCP中应用Spring OSGI 管理bean(一)”表明这是一篇关于如何在Eclipse Rich Client Platform (RCP)应用程序中集成Spring框架,并利用OSGi服务来管理Bean的教程。Eclipse RCP是一个用于构建桌面...

    Eclipse RCP与Spring OSGi技术详解与最佳实践

    《Eclipse RCP与Spring OSGi:技术详解与最佳实践》由资源的Eclipse专家亲自执笔,并得到了Eclipse官方技术社区的强烈推荐,权威性毋庸置疑!内容全面,系统讲解了利用Eclipse RCP和Spring OSGi开发大规模Java应用的...

    spring-dm-osgi整合jar包

    2. Spring DM库:如`spring-osgi-core`, `spring-osgi-io`, `spring-osgi-extender`等,提供了与OSGi环境交互的接口和工具。 3. OSGi框架库:如`org.eclipse.osgi`,这是实现OSGi规范的实现,例如Equinox或Felix。 4...

    spring-osgi-1.2.0-with-dependencies.zip

    spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip spring-osgi-1.2.0-with-dependencies.zip

    Spring OSGi 入门.rar

    Spring OSGi 是一个将流行的Spring框架与OSGi(Open Service Gateway Initiative)规范结合的开源项目,它允许开发者在OSGi环境中充分利用Spring的功能。OSGi是一种模块化系统,旨在创建可伸缩、灵活且可维护的Java...

    Spring OSGi 入门.pdf

    - **OSGi R4标准:**确保Bundle的Manifest中包含`Bundle-ManifestVersion: 2`,这是OSGi R4规范的要求。 - **调试环境搭建:**以Eclipse 3.2为例,需要安装Equinox 3.2.2,并将Spring DM相关的JAR文件复制到Eclipse...

    OSGISpring OSGISpring

    2. **Spring与OSGI的桥梁**:Spring Dynamic Modules(SDM)是Spring项目的一部分,它提供了在OSGI环境中使用Spring的基础设施。SDM允许Spring应用在OSGI容器中作为bundles运行,并管理它们的生命周期。 3. **服务...

Global site tag (gtag.js) - Google Analytics