这是一个复杂的配置问题,我在这里有一个示例项目(开发分支)-> https://github.com/gadieichhorn/play.karaf.calculator/tree/develop
我打包了这些特性,并使用了karaf组装工件,试图用我已经部署的项目创建一个定制的karaf发行版。
到目前为止,我可以在本地的karaf上部署这个特性/kar,但是当我创建一个定制的karaf程序集时,create服务就不能工作了。
打包过程是自动化的:构建->特性/kar ->组装->集成测试(pax-test) -> docker ->验收。
2016-09-12 02:14:52,245 | WARN | qtp18647439-126 | AbstractJAXBProvider | 40 - org.apache.cxf.cxf-rt-frontend-jaxrs - 3.1.6 | javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory not found by cxf-dosgi-ri-dsw-cxf [13]]Here is my feature dependencies:
```javascriptscr
白羊座-rsa核心
cxf-dosgi-provider-cxf
here is my assembly:
```javascript <configuration> <startupFeatures> <feature>eventadmin</feature> </startupFeatures> <bootFeatures> <feature>minimal</feature> <feature>shell</feature> <feature>shell-compat</feature> <feature>aries-blueprint</feature> <feature>scr</feature> <feature>aries-rsa-core</feature> <feature>cxf-jaxrs</feature> <feature>cxf-dosgi-provider-cxf</feature> <feature>calculator</feature> </bootFeatures> </configuration>my REST service API
```javascript@组件(
name = "org.play.karaf.calculator.proxy.root", service = {ProxyRoot.class}, property = { "service.exported.interfaces=*", "service.exported.configs=org.apache.cxf.rs", "org.apache.cxf.rs.httpservice.context=/calculator", "org.apache.cxf.rs.address=/proxy" })
公共类ProxyRootProvider实现ProxyRoot {.
我的模型仍然是JAXB实现,它应该由CXF的默认提供程序来实现。我需要添加提供程序吗?
我试过:
我在集会舞台上错过了什么来让发行版发挥作用?
谢谢。
发布于 2017-05-19 13:46:08
您有一个错误的特性: cxf-dosgi-provider-cxf必须是cxf-dosgi-provider-rs
此外,还比较了karaf _home/lib/ and中的库,这些库在您的定制karaf程序集中和默认的karaf分发中得到了认可。如果不相同,请将所有认可的库添加到您的配置中。
例如:
<libraries>
<library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/2.8.0;type:=endorsed</library>
<!-- ... other libraries -->
</libraries>https://stackoverflow.com/questions/39445538
复制相似问题