Skip to content

Ch18/hibernate-ogm code does not work #3

@Mehdi-HAFID

Description

@Mehdi-HAFID

When I try to run the test class HibernateOGMTest I get for mongodb

javax.persistence.PersistenceException: Unable to build entity manager factory

main.HibernateOGMTest.setUp(HibernateOGMTest.java:26)

one of the warning says
WARN: HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.

error out here
entityManagerFactory = Persistence.createEntityManagerFactory("ch18.hibernate_ogm");

persistence.xml & pom.xml are exact match as the source code so no typo there.

But when I changed to using neo4j instead of mongodb there is no error anymore and the tests pass.
can anyone confirm that the issue exists for them too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions