Error hibernate: No Persistence provider for EntityManager named HibernateEjemplo1

Hi, I’m a programming student and this is my first contact with Hibernate and I am new here.

I tried to publish a post with screenshots of all the files in my java Maven project and the programme structure, but apparently because I’m new I can’t attach more than one image to this post.

When trying to make a program with netbeans 16 and JDK 19, using Hibernate to connect to a SQL database I get the following error.

if anyone wants to see the structure of the project and the content of the files, they can do so at this link:
https://equal-cheshire-058.notion.site/Hibernate-problem-da3d27a7b94547febc2e31020a3cfbf4

Any help is welcome.
Sorry if this is not the right place to publish this post.
Thank you in advance.

Hi there. Hibernate 6+ is Jakarta Persistence only i.e. the jakarta.persistence namespace, but you are apparently using the javax.persistence namespace. Either switch to Hibernate 5 or change your code to use the jakarta.persistence types and remove the hibernate-jpa-2.1-api artifact. Also, you seem to be using EclipseLink and Hibernate which are both JPA providers. This might become a problem as well.