【问题标题】:Feature / bundle list for JPA [2.1] for KarafKaraf 的 JPA [2.1] 的功能/捆绑列表
【发布时间】:2017-02-08 14:18:15
【问题描述】:

我正在尝试将项目从 Eclipse OSGi 运行时环境迁移到 Karaf,并为依赖项准备安装脚本。这是一个相当困难的方法,例如事务API需要javax.enterprise.cdi-api,而这需要

javax.el,version=3.0.0 from javax.el-api (6)
javax.inject,version=1.0.0 from com.eclipsesource.jaxrs.jersey-all (59)
javax.interceptor,version=1.2.0 from javax.interceptor-api (48)

当然,我不是第一个也不是最后一个这样做的人。是否有任何现成的功能/捆绑列表/安装脚本可用于该过程?以及如何/在哪里搜索它们?

搜索“Karaf 的 JPA 2.1 功能”返回给我的帖子列表存在人们在构建功能列表时遇到的问题...没有现成的解决方案...

【问题讨论】:

    标签: java jpa karaf


    【解决方案1】:

    我正在开发Apache ServiceMix 7.0.0,我有一个可用的JPA 2.3.0 功能。

    功能列表

    karaf@root>feature:list | grep jpa
    deltaspike-jpa                          | 1.2.1            |          | Uninstalled | org.ops4j.pax.cdi-0.12.0    | Apache Deltaspike jpa support
    camel-jpa                               | 2.16.4           |          | Uninstalled | camel-2.16.4                |
    jpa                                     | 1.0.4            |          | Uninstalled | enterprise-4.0.8            | OSGi Persistence Container
    jpa                                     | 2.3.0            | x        | Started     | enterprise-4.0.8            | OSGi Persistence Container
    openjpa                                 | 2.2.2            |          | Uninstalled | enterprise-4.0.8            | Apache OpenJPA 2.2.x persistence engine support
    openjpa                                 | 2.3.0            |          | Uninstalled | enterprise-4.0.8            | Apache OpenJPA 2.3.x persistence engine support
    openjpa                                 | 2.4.1            |          | Uninstalled | enterprise-4.0.8            | Apache OpenJPA 2.4.x persistence engine support
    deltaspike-jpa                          | 1.3.0            |          | Uninstalled | org.ops4j.pax.cdi-1.0.0.RC1 | Apache Deltaspike jpa support
    drools6-jpa                             | 6.2.0.Final      |          | Uninstalled | servicemix-kie-7.0.0        | Drools 6 JPA support
    

    JPA 2.3.0 来自 enterprise-4.0.8 功能存储库,URL 为 mvn:org.apache.karaf.features/enterprise/4.0.8/xml/features

    存储库列表

    karaf@root>feature:repo-list
    Repository                  | URL
    -------------------------------------------------------------------------------------------------------
    org.ops4j.pax.cdi-0.12.0    | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
    jclouds-1.9.1               | mvn:org.apache.jclouds.karaf/jclouds-karaf/1.9.1/xml/features
    org.ops4j.pax.jdbc-0.9.0    | mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.9.0/xml/features
    camel-2.16.4                | mvn:org.apache.camel.karaf/apache-camel/2.16.4/xml/features
    activemq-core-5.14.3        | mvn:org.apache.activemq/activemq-karaf/5.14.3/xml/features-core
    org.ops4j.pax.web-4.3.0     | mvn:org.ops4j.pax.web/pax-web-features/4.3.0/xml/features
    enterprise-4.0.8            | mvn:org.apache.karaf.features/enterprise/4.0.8/xml/features
    org.ops4j.pax.cdi-1.0.0.RC1 | mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0.RC1/xml/features
    framework-4.0.8             | mvn:org.apache.karaf.features/framework/4.0.8/xml/features
    standard-4.0.8              | mvn:org.apache.karaf.features/standard/4.0.8/xml/features
    cxf-3.1.5                   | mvn:org.apache.cxf.karaf/apache-cxf/3.1.5/xml/features
    activemq-5.14.3             | mvn:org.apache.activemq/activemq-karaf/5.14.3/xml/features
    servicemix-kie-7.0.0        | mvn:org.apache.servicemix.features/servicemix-kie/7.0.0/xml/features
    spring-4.0.8                | mvn:org.apache.karaf.features/spring/4.0.8/xml/features
    servicemix-features-7.0.0   | mvn:org.apache.servicemix.features/servicemix-features/7.0.0/xml/features
    servicemix-examples-7.0.0   | mvn:org.apache.servicemix.features/servicemix-examples/7.0.0/xml/features
    

    我希望这会有所帮助。

    【讨论】:

    • 正确的方式。我有点远。持久性单元仍未启动。
    • 你有什么例外吗?
    • 诊断显示依赖项有问题:缺少依赖项:(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=aries.apache.org/xmlns/transactions/v2.0.0))
    • 如果有transaction功能,可以试试安装吗?
    • 是的,现在我还有更多错误。缺少依赖项: (&(osgi.unit.name=officialUnit)(objectClass=org.apache.aries.jpa.template.JpaTemplate)) 我没有安装 JPA 吗?我使用过 jpa/2.5.0 - 来自 maven 的手动添加功能
    猜你喜欢
    • 1970-01-01
    • 2017-05-15
    • 2014-05-04
    • 1970-01-01
    • 2019-05-03
    • 1970-01-01
    • 1970-01-01
    • 2015-05-22
    • 1970-01-01
    相关资源
    最近更新 更多