JPAaddressbookdemo and error with .createEntityManagerForPersistenceUnit

Hi!

In HierarchicalDepartmentContainer:
JPAContainerFactory.createEntityManagerForPersistenceUnit(JpaAddressbookApplication.PERSISTENCE_UNIT))); is giving error because that kind of method doesn’t exists in JPAContainer. GetEntityManagerForPersistenceUnit in JPAContainerFactory is private…Just started to read about JPA and I would like to use that demo as a teacher.

Cheers,
Sami

Hi,

The address book demo and JPAContainer 2.0 is currently under active development. The snapshot build was not up to date with the svn checkout you had made. I just initiated a new snapshot build which should be available in oss sonatype soon (eta 10 minutes). Then the project should compile fine again.

You might also want to check out the
related tutorial
. Marko is currently working on that too, but it is some good stuff already.

cheers,
matti

The method createEntityManagerForPersistenceUnit(String) is undefined for the type JPAContainerFactory, still got the same or did I understood something wrong? Where can I find the latest snapshot build in jar?

BTW thanks for answering so quickly to me :slight_smile: I just started to read the JPAContainer tutorial…

Sami

Hi,

The latest snapshot build should be in our snapshot repository (oss.sonatype.org). Depending on you project setup you might somehow need to force your environment to fetch latest the latests snapshot.

In eclipse it can be done somehow like this: project->right click → maven → update dependencies → force. Closing and reopening the project or restarting eclipse might do the trick also.

cheers,
matti

Thanks! I made it and it’s up and running now.

Sami