0

我有一个持久性捆绑包,大多数情况下它工作得很好,但每隔一段时间它就会卡在GracePeriod,当这种情况发生时,缺少的依赖是EntityManager

karaf@root>bundle:diag 237
framework-connect-persistence (237)
 -----------------------------------
Status: GracePeriod
Blueprint
2/27/17 2:48 PM
Missing dependencies:
(&(osgi.unit.name=PersistenceUnitPrimary)(objectClass=javax.persistence.EntityManager))

但是,正如你所看到的,有一个EntityManager

karaf@root>service:list EntityManager
[javax.persistence.EntityManager]
 ---------------------------------
osgi.unit.name = PersistenceUnitPrimary
service.bundleid = 237
service.id = 427
service.scope = singleton
Provided by :
framework-connect-persistence (237)

重新启动捆绑包不会改变任何东西。但是重新启动捆绑包org.apache.aries.jpa.blueprint可以解决问题

有任何想法吗 ?

谢谢

编辑 :

捆绑:列表

特征:列表

清单文件

日志

持久性.xml:

<?xml version="1.0" encoding="UTF-8"?><persistence version="2.1"
         xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/                http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">  

<persistence-unit name="ConztanzEntityManagerFactoryPrimary" transaction-type="JTA">            
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
    <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=ConztanzDB)</jta-data-source>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>            
        <property name="hibernate.connection.release_mode"   value="auto"/>
        <property name="hibernate.dialect" value="com.conztanz.persistence.dialect.PostgreSQLConztanzDialect"/>n setting -->
        <property name="hibernate.current_session_context_class" value="jta"/>
        <property name="hibernate.transaction.jta.platform"      value="com.conztanz.persistence.jta.ConztanzJtaPlatform"/>
        <property name="hibernate.jdbc.batch_size" value="25"/> 
        <property name="hibernate.order_inserts" value="true"/>
        <property name="hibernate.order_updates" value="true"/>
        <property name="hibernate.show_sql"         value="true"/>
        <property name="hibernate.format_sql"       value="true"/>
        <property name="hibernate.use_sql_comments" value="false"/>
    </properties>
</persistence-unit>

4

0 回答 0