Upgrade 4.2.x -> 4.3.0 error: any types do not have a unique referenced persister

Description

To use JPA 2.1 features, I've been trying to upgrade the Hibernate suite from 4.2.6 to 4.3.0. The application throws an exception when it starts. Apparently while analyzing the entity model - not while creating the database:

any types do not have a unique referenced persister

It relates to an association annotated with @Any. I'm pretty sure I've followed the example of the documentation. Moreover it all works with 4.2.6. So maybe the semantics of @Any were changed, but the documentation wasn't yet updated ? Is it a corner case ?

The association

The embeddable class

For convenience I've put it into an embeddable. Otherwise sooner or later somebody will make a typo in the annotations.

The stack trace

I'm putting all the details into SO at:
https://stackoverflow.com/questions/21046239/hibernate-4-3-0-upgrade-any-types-do-not-have-a-unique-referenced-persister

Environment

JDK 1.6.0_43, Linux Debian Wheezy x64.

Activity

Show:
Jan Goyvaerts
January 15, 2015, 5:17 PM

One year has passed !

Anyone any idea ?

Gail Badner
January 15, 2015, 6:39 PM

Does this happen only when an @Any is in an @Embeddable?

Please create a pull request with an additional test to org.hibernate.test.annotations.any.AnyTest that reproduces your issue and the proposed fix.

Jan Goyvaerts
January 16, 2015, 8:41 AM

I'll have to investigate. But being not well versed in the deep Hibernate stuff it might take some time...

But it would already help me if I knew what the error message precisely means.

Jan Goyvaerts
January 16, 2015, 10:52 AM

I've had another go at the problem - but still no luck.

Did you manage to solve it ?

Brett Meyer
August 26, 2015, 8:53 PM

Bulk-rejecting tickets that did not include a test case or additional details.

Assignee

Unassigned

Reporter

Jan Goyvaerts

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure