This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes No persister for: java.lang.Integer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No persister for: java.lang.Integer" Watch "No persister for: java.lang.Integer" New topic

No persister for: java.lang.Integer

Neil Lowrey

Joined: Nov 08, 2004
Posts: 2
I'm receiving this exception while saving an entity with a composite id that includes a many-to-one relationship to it's parent table. The trackingNumber and fiscalYear are primitive int, while the appropriationType is String. The child entity, RequestFundingFica, overrides equals/hashCode and implements Synchronized.

Here's the parent table mapping:

Here's the child table mapping:

With debug turned on, I get the following in the log:

What am I missing here?
Praveen Kumar

Joined: May 17, 2004
Posts: 15 says that it is better to use Objects for Primary Keys. May be the problem will be resolved if you change the Primary Key type to Long/Integer on your ORDERS table. You might want to do the same on the Child table too.

Good Luck,


Gosh ! Darn it.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Here is a link to something similar: link.
If the solution there doesn't work for you, I suggest you should use the Hibernate forum.


blog -
Neil Lowrey

Joined: Nov 08, 2004
Posts: 2
Thanks for the responses over the weekend!

I had remembered to included the hbm.xml file, so that wasn't the problem. At this point, I'm still not sure why this wasn't working. Due to time constraints, I have abandoned the composite key in favor of a surrogate key generated from a sequence. It's working like a champ now.
I agree. Here's the link:
subject: No persister for: java.lang.Integer
It's not a secret anymore!