I seems that it has to to with the hibernate version. With only hibernate 5
installed the processing of the datasource doesn't seem to work:
2016-01-08 09:44:23,710 | INFO | .aries.jpa.pra]) | ManagedEMF
| 70 - org.apache.aries.jpa.container - 2.2.0 | Registering
EntityManagerFactory for persistence unit pra
2016-01-08 09:44:23,711 | INFO | .aries.jpa.pra]) | LogHelper
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000204: Processing
PersistenceUnitInfo [
name: pra
...]
2016-01-08 09:44:23,979 | INFO | pool-83-thread-1 | FeaturesServiceImpl
| 9 - org.apache.karaf.features.core - 4.0.3 | No deployment change.
2016-01-08 09:44:23,998 | INFO | pool-83-thread-1 | FeaturesServiceImpl
| 9 - org.apache.karaf.features.core - 4.0.3 | Stopping bundles:
2016-01-08 09:44:24,001 | INFO | pool-83-thread-1 | FeaturesServiceImpl
| 9 - org.apache.karaf.features.core - 4.0.3 |
org.ops4j.pax.jdbc.pool.dbcp2/0.7.0
When I install the default hibernate feature on top of that the processing
works and I get an EntityManager:
2016-01-08 09:48:08,057 | INFO | .aries.jpa.pra]) | ManagedEMF
| 70 - org.apache.aries.jpa.container - 2.2.0 | Registering
EntityManagerFactory for persistence unit pra
2016-01-08 09:48:08,065 | INFO | .aries.jpa.pra]) | LogHelper
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000204: Processing
PersistenceUnitInfo [
name: pra
...]
2016-01-08 09:48:08,327 | INFO | FelixStartLevel | BlueprintContainerImpl
| 13 - org.apache.aries.blueprint.core - 1.4.5 | Bundle
pra-osgi-dao-impl/1.0.0.SNAPSHOT is waiting for dependencies
[(&(osgi.unit.name=pra)(objectClass=javax.persistence.EntityManager))]
2016-01-08 09:48:08,354 | INFO | .aries.jpa.pra]) | Dialect
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000400: Using
dialect: org.hibernate.dialect.Oracle10gDialect
2016-01-08 09:48:08,522 | INFO | .aries.jpa.pra]) | SchemaExport
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000227: Running
hbm2ddl schema export
2016-01-08 09:48:08,598 | INFO | .aries.jpa.pra]) | SchemaExport
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000230: Schema
export complete
2016-01-08 09:48:08,605 | INFO | FelixStartLevel |
PersistenceProviderTracker | 70 - org.apache.aries.jpa.container -
2.2.0 | Found provider for pra
org.hibernate.jpa.HibernatePersistenceProvider
2016-01-08 09:48:08,630 | INFO | FelixStartLevel | LogHelper
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000204: Processing
PersistenceUnitInfo [
name: pra
...]
2016-01-08 09:48:08,778 | INFO | FelixStartLevel | Version
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000412: Hibernate
Core {4.3.6.Final}
2016-01-08 09:48:08,784 | INFO | FelixStartLevel | Environment
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000206:
hibernate.properties not found
2016-01-08 09:48:08,801 | INFO | FelixStartLevel | Environment
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000021: Bytecode
provider name : javassist
2016-01-08 09:48:09,067 | INFO | FelixStartLevel | Version
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HCANN000001:
Hibernate Commons Annotations {4.0.4.Final}
2016-01-08 09:48:09,160 | INFO | FelixStartLevel | Dialect
| 90 - org.jboss.logging.jboss-logging - 3.3.0.Final | HHH000400: Using
dialect: org.hibernate.dialect.Oracle10gDialect
...
So it seems Aries JPA has problems with the hibernate 5 version. Or is it
possible that some of the bundles that come with the provided hibernate
version are missing?
105 | Active | 80 | 1.1.0 | ClassMate
111 | Active | 80 | 1.8.2.2 | Apache ServiceMix :: Bundles ::
ant
143 | Active | 80 | 1.0.2.Final | JACC 1.4 API
I will also try to enable debug logging or something else to get a hint
about the problems for Aries JPA.
Christian
--
View this message in context:
http://karaf.922171.n3.nabble.com/Injection-Problem-with-JPA-and-Camel-in-Karaf-4-0-3-tp4044627p4044706.html
Sent from the Karaf - User mailing list archive at Nabble.com.