Thanks Christian,

I will try repackaging openjpa.

Switching gears a little, I have a couple of branches where I am flushing out these Karaf4/JPA woes. One branch uses openjpa & another uses eclipselink. Switching over to the eclipselink branch, I have the following configuration message in the karaf.log:

2015-11-30 11:54:56,746 | INFO  | rint Extender: 3 | BlueprintContainerImpl     
      | 39 - org.apache.aries.blueprint.core - 1.4.5 | Bundle 
hearsay-dao-jpa/0.0.46.SNAPSHOT is waiting for namespace handlers 
[http://aries.apache.org/xmlns/transactions/v2.0.0]

2015-11-30 11:54:56,779 | INFO  | rint Extender: 1 | BlueprintContainerImpl         
  | 39 - org.apache.aries.blueprint.core - 1.4.5 | Bundle 
hearsay-dao-jpa/0.0.46.SNAPSHOT is waiting for dependencies 
[(&(osgi.unit.name=hearsay)(objectClass=javax.persistence.EntityManager))]


This branch more closely resembles the KarafTutorial/tasklist-blueprint-cdi project. Here are the details...

From the custom distro pom.xml file's bootFeatures:

        <feature>pax-cdi</feature>

        <feature>jdbc</feature>

        <feature>transaction</feature>

        <feature>jpa</feature>

        <feature>eclipselink</feature>

        <feature>hearsay-commons</feature>

        <!-- <feature>hearsay-dao</feature> -->


From the BaseDAO class:

    @PersistenceContext(unitName = "hearsay")

    private EntityManager em;


From the blueprint.xml file:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"; 
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";

  xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0"; 
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0";>

  <jpa:enable />

  <tx:enable />

  <service ref="alignmentDAOImpl" interface="org.renci.hearsay.dao.AlignmentDAO" 
/>

  <bean id="alignmentDAOImpl" class="org.renci.hearsay.dao.jpa.AlignmentDAOImpl" 
ext:field-injection="true" />

</blueprint>


As with the openjpa branch, all the bundles are active upon bootup, but when I install the "hearsay-dao" feature, the dao impl bundle is in a graceperiod state. When I rollback the transaction namespace in the blueprint.xml file to 1.2.0 & use 'enable-annotations' instead of 'enable', I get only the following message in the karaf.log:

2015-11-30 12:20:48,312 | INFO  | pool-64-thread-1 | BlueprintContainerImpl         
  | 39 - org.apache.aries.blueprint.core - 1.4.5 | Bundle 
hearsay-dao-jpa/0.0.46.SNAPSHOT is waiting for dependencies 
[(&(osgi.unit.name=hearsay)(objectClass=javax.persistence.EntityManager))]


Do you have suggestions for this scenario?

Thanks,
Jason


Reply via email to