on 04-06-2011 9:34 AM
Hi,
We have generated entities from the existing tables using the data base connection. The entities are generated fine. But after that i am getting the below error.
Error:
The persistent attribute 'tktValLocal' in class 'com.stt.entity.TbSttTicketData' tagged as 'basic' exists, but is not persistent according to the JPA specification.
We are using JPA 1.0. I could find this particular attribute is created as "Object" data type in the generated entity class.But in database it is defined as a "BINARY_FLOAT". I googled with the data type and found that BINARY_FLOAT is compatible with java.lang.Float.
After change it , am getting the below error while run time.
Caused by: java.lang.RuntimeException: The persistence unit is inconsistent with the database schema:
Error on entity >>com.stt.entity.TbSttTicketData<<: The table >>TB_STT_TICKET_DATA<< does not exist.
Please advice me to solve this problem.
BR
Karthika
Edited by: SAKarthika on Apr 6, 2011 11:06 AM
Hi,
you have used the generate entities from database tables feature, which has not recognized the Oracle-specific type BINARY_FLOAT. It could not map this type to float but generated a field with type Object in to the entity. Object, however, is not a persistent data type recognized by JPA. You have to edit the generated entiy manually. This is what you did.
Now, you are observing the error:
Caused by: java.lang.RuntimeException: The persistence unit is inconsistent with the database schema:
Error on entity >>com.stt.entity.TbSttTicketData<<: The table >>TB_STT_TICKET_DATA<< does not exist.
This error is not related to the issue you were observing before. Instead, I assume that either
- your application is not associated with a data source referring to the schema you generated the entities from or
- your data source is configured for Open SQL. In this case you can't see the native Oracle schema. Please configure your data source for Native SQL.
I hope this helps,
Adrian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.