0

I have a Vaadin 7.3.8 portlet running in Liferay 6.2 CE using JPA 2.1 with EclipseLink 2.5.2 developed with Maven. The portlet runs as expected without JPA errors on my local Mac OS X box with a Liferay 6.2 / Glassfish 3.2 bundle and MySQL 5.6 and MySQL JDBC 5.1.34 connector and JDK 1.7_71. I am not using a datasource in Glassfish. I am letting EclipseLink handle the connection pooling, so there is no setup of a datasource on Glassfish required.

The target environment is CentOS 6.4 with the same stack deployed accept JDK 1.7_72. When I deploy the portlet to the target environment, I get the dreaded:

javax.persistence.PersistenceException: No Persistence provider for EntityManager named xxxxxxx

I have checked CLASSPATH and everything I know to check based on all the very informative posts on JPA in this forum. Nothing is solving my issue to get this portlet running in the target environment.

Has anyone run into this type of issue? Baffled!

lifer
  • 31
  • 2

2 Answers2

0

Glassfish, the application server on which Liferay is running, still requires access to the EclipseLink JARs for using the API.

Be sure to have these three files to the /lib/ext/ folder in your Glassfish domain, or in the application classpath:

  • persistence.jar
  • eclipselink.jar
  • mysql-connector.jar
ibelcomputing
  • 152
  • 12
0

Solution found. Apparently, the version of Eclipselink in Glassfish OSGi bundles needs to be the same as what you are deploying in the WAR file. I hade to upgrade Glassfish 3.2.2 to Eclipselink 2.5.2 using this approach: http://dimaki.blogspot.com/2014/02/update-glassfish-3122-eclipselink.html

A good friend sent me this reminder.

lifer
  • 31
  • 2