Since apache camel-jpa has a dependency on openjpa in its features.xml, OpenJPA is always initialized as a JPA provider on karaf, causes failure when trying to use Hibernate as a JPA provider.
Even If I re-define camel-jpa feature with removing openjpa, It still fails. I did see org.hibernate.osgi.OsgiPersistenceProvider is available at JNDI name "osgi:service/javax.persistence.spi.PersistenceProvider", but it couldn't find META-INF/persistence.xml on createEntityManagerFactory.
Here is the features.xml diff: https://gist.github.com/igarashitm/a204f8d0b27125dcd342
If I add <feature>jpa</feature> dependency persistence.xml is detected, however, get another error saying DataSource is not retrieved via JNDI: https://gist.github.com/igarashitm/4dc1a25636d79e0ea65e
It's weird because DataSource is already registered before getting above error:
|