1

I'm work on a multi module maven project and for the persistence I use eclipselink. When I deploy the ear file in weblogic I always get this error message: Failed to load webapp /yyy. Error processing persistent unit xxx of module /yyy. Error instantiating the Persistence Provider class org.apache.openjpa.persistence.PersistenceProviderImpl of the PersistentUnit xxx. java.lang.ClassNotFoundException org.apache.openjpa.persistence.PersistenceProviderImpl. I guess it tries to use the default openjpa provider, but I have configured it to use eclipselink in the persistence.xml. Any ideas?

Hurve
  • 173
  • 1
  • 2
  • 12

1 Answers1

0

Use the prefer-web-inf-classes element in your weblogic.xml application descriptor.
According to the documentation,

Setting this element to True subverts the classloader delegation model so that class definitions from the Web application are loaded in preference to class definitions in higher-level classloaders. This allows a Web application to use its own version of a third-party class, which might also be part of WebLogic Server.

This is a related question which might help you as well.

Community
  • 1
  • 1
Viccari
  • 9,029
  • 4
  • 43
  • 77