cancel
Showing results for 
Search instead for 
Did you mean: 

Generation has failed due to invalid persistence unit in JPA

sajith_p
Participant
0 Kudos

Hi Experts

I am getting error while generating the dictionary table using the JPA Tools-->Generate Tables from Entities. Error is given below

Generation has failed due to invalid persistence unit. See the problem views for details.

In the problem view it is not giving the details it gave the particular table name cannot be resolved error only.

The persistence.xml content given below

<?xml version="1.0" encoding="UTF-8"?>

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

  <persistence-unit name="DEM_PER_UNI" transaction-type="JTA">

  <jta-data-source>DEMO_JPA_ALIAS</jta-data-source>

  <class>demo.jpa.entity.DemoJPADo</class>

  </persistence-unit>

</persistence>

I have already done the connection to the dictionary DC from EJB Property-->Java Persistence

also enabled the Override the default schema from connection

Discover annotated classes automatically selected

Platform SAP Implementation of JPA

Attached screen shot FYR.

Please help.

Thanks

Sajith

Accepted Solutions (1)

Accepted Solutions (1)

sajith_p
Participant
0 Kudos

Hi All

This issue has been resolved now.

Reason for error:

Used the field as java.util.Date type in the entity and causes this error.

Solution done:

Changed to java.sql.Date type and resolved this issue.

Thanks to All

Regards

Sajith

Answers (0)