Finally I've got it. I should not use any persistence.xml at all. When I do not use it, I got this error:
HTTP Status 500 - org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. Available properties in configuration are "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@fdaf18ee".
openjpa conflicts with existing JPA of my objectdb.jar.
To avoid it, I removed openjpa-asm-shaded-
X.X.X.jar
from my TomEE/lib
folder.
Summarize
Only:
Persistence.createEntityManagerFactory("$objectdb/db/painInTheAss.odb");
for EntityManagerFactory
Only:
objectdb-ee.jar
for objectdb library in dependencies.
Only without:
openjpa-asm-shaded-X.X.X.jar
in TomEE/lib
Netbeans could still create persistance.xml for you which will break everything.
if you still not successful and use NetBeans, clear its cache, in C:\Users\
YOURNAME\AppData\Local\NetBeans\Cache
You may look in YOURPROJECT\nbproject\project.properties
to see some old malformed settings you played around and leaved as it is.