Glassfish 4 with EMF Texo - JPA No persistence provider

I'm trying to use EMF Texo in Glassfish 4, but when I want to initialize EntityManagerProvider I get the error:

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

I tried to implement the Texo tutorial found here. The difference is that I want it to run on Glassfish 4.

Bellow is my code:





import javax.servlet.ServletContextListener;
import org.eclipse.emf.texo.server.service.ServiceModelPackageRegistry;
import org.eclipse.emf.texo.test.model.base.identifiable.IdentifiableModelPackage;

public class TexoContextListener implements ServletContextListener{

public void contextInitialized(ServletContextEvent arg0) {
    // initialize aggressively
public void contextDestroyed(ServletContextEvent arg0) {
    // TODO Auto-generated method stub



In debug I get the error mentioned above when I try to initialize() the EntityManagerProvider.


<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
    <persistence-unit name="HelloTexo" transaction-type="JTA">

I created this file automatically by adding JPA Project Facet to my project from Eclipse. The connection to database is succesful. I tried to move the persistence.xml to WEB-INF/classes/META-INF/ but I still get the same error.

Any idea what might cause the error? I am stuck here for some days now... I really hope someone will be able to give me an ideea.


There may be a classloader conflict. Glassfish4 includes EclipseLink in the container library path. Try removing your explicit <provider> tag and any jpa implementation jars from WEB-INF/lib folder. The standard Glassfish javax.persistence.jar should be all you need.

Need Your Help

JMX Monitoring Software

jboss monitoring jmx

I am trying to find a good monitoring software for my simple hello world application written by test purposes.

Sliding form stop animation if mandatory field empty

jquery forms validation animation

I have a big form so for that am using sliding form

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.