This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes I get exception that class is not mapped. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "I get exception that class is not mapped. " Watch "I get exception that class is not mapped. " New topic
Author

I get exception that class is not mapped.

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

I have one class (CountyBean) that is mapped to the county table.

On my dev environment (connects to Dev database) it works as expected. On the Test environment (connects to Test database) , I got the unmapped class exception for the CountyBean. I noticed that other Entities that behaved like CountyBean did not implement Serializable. Once I stopped implementing it for CountyBean, It worked correctly.
These entities do not UPDATE or INSERT, they only select at this point.
I thought Hibernate persisted entities were supposed to implement Serializable. If so, I must have missed some simple concept in setting up my project. Can anyone enlighten me?
Hemant Thard
Ranch Hand

Joined: Dec 23, 2008
Posts: 122
hi Tim,

persisted entities in hibernate are not stored in serialized form.

check this out.
Serialize objects in Hibernate

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I get exception that class is not mapped.
 
Similar Threads
Testing and assimilating the three tier environment
Question about Serialization
WSAD backend folder id
question in serializable
Cannot create PoolableConnectionFactory