0 votes
in Education by (1.7m points)
I am wanting to understand this Karaf JPA example.

When I follow the instructions to add features and run the bundles for eclipseLink, the example works correctly.

However, if I try to use Hibernate, it doesn't work. I don't know Hibernate / H2 well enough to know what I am missing. When I run feature:install karaf-jpa-example-provider-ds-hibernate, I see this in the log:

javax.persistence.PersistenceException: [PersistenceUnit: booking-hibernate] Unable to build Hibernate SessionFactory

diag returns this information:

Status: Waiting

Declarative Services

org.apache.karaf.examples.jpa.provider.ds.hibernate.BookingServiceImpl (1) missing references: jpaTemplate

The karaf and H2 installs are new and empty. My suspicion is that there is something in H2 I need to do but I have no experience with this db.

Edit: Using the blueprint example, again eclipseLink works and Hibernate does not. Performing this command: feature:install karaf-jpa-example-provider-blueprint-hibernate causes this error in the log:

ERROR [features-2-thread-1] Bundle org.apache.aries.jpa.container [72] EventDispatcher: Error during dispatch. (javax.persistence.PersistenceException: [PersistenceUnit: booking-hibernate] Unable to build Hibernate SessionFactory)

javax.persistence.PersistenceException: [PersistenceUnit: booking-hibernate] Unable to build Hibernate SessionFactory

And this is the diag:

Missing dependencies:



Edit #2: I am using JDK11 (11.0.2).

thanks, jon

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by (1.7m points)
It appears the problem is JDK11. I have moved to JDK8 and it is working.

This is the post that clued me in: https://hibernate.atlassian.net/browse/HHH-12924