VIRIT JPA based address book demo - Tomcat EE

Hi,

I can succesfully run the demo on https://github.com/mstahv/jpa-addressbook with wildfly (as used in the pom of this project).
Now, I want to run the demo in TomEE.
I get the following exception:

rg.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
SEVERE: EjbTransactionUtil.handleSystemException: user lacks privilege or object not found: PHONEBOOKGROUP {SELECT t0.id, t0.version, t0.name FROM PhoneBookGroup t0} [code=-5501, state=42501]

It seems that there is somethin wrong with the database setup.
What should I add to get this demo running with tomcat EE?

Thanks,

JG

Hi,

Try with this change:
https://github.com/mstahv/jpa-addressbook/commit/6050f982a6c3e97c66b7285c0932c65811c3c6aa

TomEE is not yet Java EE 7 server so it don’t figure out it should autogenerate the DB based on the java ee configuration that I only had there.

cheers,
matti

Works in TomEE.

Best,

JG