When running a project built by maven with the following dependencies:
org.eclipse.persistence
Obinna's answer is correct; I guess that there was an issue with eclipselink 2.7.x –as George indicated. I had a similar issue when upgrading eclipselink, but it was just wrong artefacts. The initially described issue seems to be a result of externally referencing javax.persistence level - it is definitely not necessary.
Proper maven configuration can be found in eclipselink wiki: https://wiki.eclipse.org/EclipseLink/Maven