I am attempting to call persistence.xml to display some data from a database in the Netbeans IDE. I have looked and tried the different methods that previous users have proposed but I am still unable to solve the problem.
I have used this to call the persistence unit,
EntityManagerFactory emf = Persistence.createEntityManagerFactory("TimeEven DataBasePU");
This is what is returned when I try to run the file,
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named TimeEven DataBasePU
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at internal.assesment.TimeTableEventList.main(TimeTableEventList.java:110)
C:\Users\User\Documents\NetBeansProjects\Timetable\nbproject\build-impl.xml:1051: The following error occurred while executing this line:
C:\Users\User\Documents\NetBeansProjects\Timetable\nbproject\build-impl.xml:805: Java returned: 1
This is the line 805 which is where the error seems to stem from
<java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
As said previously,
I have already added the provider under the Persistence unit name,
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
And I have made sure that the Persistence is unit is in the META-INF folder,
C:\Users\User\Documents\NetBeansProjects\Timetable\src\META-INF\persistence.xml
It is in the Class Path, so I am not sure where the error lies.
Edit 1. Yep, I copied and pasted from the xml code (I misspelled it in there too haha)
Edit 2.
Edit 3.