I'm using Apache TomEE, OpenJPA and Hibernate 4.2.1. When I look through the logs in catalina.out, all the Hibernate-related log entries show up twice. It seems that the commands are actually running twice as I get log entries showing that Hibernate can't add an index because it already exists, or can't delete one because it doesn't exist.
I've tried all sorts of different settings and I can't resolve this. Here's my persistence.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0"
<persistence-unit name="ExampleEngine" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
</properties>
</persistence-unit>
</persistence>
If anyone has any ideas for me, I'd really appreciate it.
Thanks,
- Andrew.