cancel
Showing results for 
Search instead for 
Did you mean: 

The persistence unit is inconsistent with the database schema: Error on entity >><><<: The table >><><< does not exist.

Former Member
0 Kudos

We have created tables in SQL studio and have tried to access through jdbc but getting following exception:

"The persistence unit is inconsistent with the database schema: Error on entity >>com.sample.Status<<: The table >>STATUS<< does not exist. "

I did following steps:

1)In EJB have created connection with MAXDB Database, created entities from tables of MAX DB, mentioned persistence-unit and class details in  persistence.xml,created stateless session bean and required classes and created public part for the EJB.

2)EAR to deploy EJB

3)In WDJ added EJB in dependency and  Initial Context .lookup() for Java Naming and Directory Interface (JNDI). 

I have created tables through java dictionary and did the same steps and those are accessible and crud functionality is also working fine.

Can you please help me to find the root cause for the issue.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you please tell how can I check

the table I created in sql studio is visible or not to the user, and if not visible how can I make the table is to visible to the user?

junwu
Active Contributor
0 Kudos

that depends on the db you are using.

google it. it is quite general.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Have you try to reestart the server?

Sometimes the server keeps cache. When reestart the cahce is clear and this problem is sollved.

This happens a lot when works with CAF.

Regards

Marcos Brandao

junwu
Active Contributor
0 Kudos

the table you created in sql studio may be not visible to the user, which is used to connect to DB.