Hello
I created a web application in Netbeans IDE. and then I added entity classes from database. When I add @PersistanceUnit annotion to the EntityManager element of the class, the application does not run.
Code:
@PersistenceUnit(unitName="WebApplication9PU")
private EntityManager em;
My persistance.xml is:
Code:
<persistence-unit name="WebApplication9PU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/sample</jta-data-source>
<properties/>
</persistence-unit>
what is the problem with that? May someone help please?