This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Getting Error when Fetching data of Object Type Column using Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Getting Error when Fetching data of Object Type Column using Hibernate" Watch "Getting Error when Fetching data of Object Type Column using Hibernate" New topic
Author

Getting Error when Fetching data of Object Type Column using Hibernate

Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25
We have oracle database in which we have table name (PRICES) and in that having one column of object type (MYMONEY).
create table prices ( id number, price mymoney );
create type mymoney as object (local_value number,mnemonic varchar2(3));

Problem is that we are not able to retrieve data list of object type column using Hibernate but we are able to insert the data on the above tables successfully.
Below is the error we are getting when we try to retrieve the data...


The following are the files we are using as follows:--

Step I) We have created Prices.java file to map with prices table.

Step II) We have created Mymoney.java file.

Step III) We have created MoneyUserType.java file using Hibernate Custom UserType.

Step IV) Then we have created HibernateMapping.xml

Step V) Then we have created HibernateUtil.java

Step VI) Then we finally created Main.java to Run the program.
 
Don't get me started about those stupid light bulbs.
 
subject: Getting Error when Fetching data of Object Type Column using Hibernate
 
Similar Threads
null pointer exception
org.hibernate.QueryException: could not resolve property: ObjectId of: test.Objtablee
SEVERE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown.
Using Hibernate & JScience together?
Is this Dao?