Can you help me with this error?
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named bsewebservicePU
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:61)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
at br.com.brbsemanager.util.HibernateSchemaGeneration.main(HibernateSchemaGeneration.java:23)
I've done everything in the project to try to run, but nothing worked.
Here are my persistence.xml
and the project folder tree:
<persistence-unit name="bsewebservicePU" transaction-type ="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>br.com.bsemanager.domain.Entidades.Cliente</class>
<class>br.com.bsemanager.domain.Entidades.Emprestimo</class>
<class>br.com.bsemanager.domain.Entidades.Endereco</class>
<class>br.com.bsemanager.domain.Entidades.Operador</class>
<properties>
<property name="javax.persistence.jdbc.url"
value="jdbc:mysql://localhost:3306/bsemanager"/>
<property name="javax.persistence.jdbc.user"
value="root"/>
<property name="javax.persistence.jdbc.password"
value="root"/>
<property name="javax.persistence.jdbc.driver"
value="com.mysql.jdbc.Driver"/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
ThisistheclassIamusingtogeneratethetablesinthedatabaseanditiswhentheerroroccurs:
publicclassHibernateSchemaGeneration{publicstaticvoidmain(String[]args)throwsMappingException,IOException{Persistence.createEntityManagerFactory("bsewebservicePU");
}
}