How to configure wildfly to use EclipseLink?

New lines in provider section of persistence.xml won't work (how could it help?). Wildfly hasn't got provided eclipseLink implementation in libs. To fix this follow this steps:

  1. Download eclipselink.jar (or copy from your maven repo)
  2. Copy it to destination : ...Wildfly\modules\system\layers\base\org\eclipse\persistence\main
  3. Edit module.xml (same path). Add section <resource-root path="eclipselink.jar"><filter><exclude path="javax/**" /></filter></resource-root>

After server restart everything should work.


Finally I solved the problem!

in fact, I have a composite unit, all persistence.xml are correct, but the persistence.xml which declared the composite unit was a bad statement of the provider:

<provider>
   org.eclipse.persistence.jpa.PersistenceProvider
</provider>

replaced by :

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

and now work fine.


You need to add provider to persistence-unit in your persistence.xml:

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>