Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MappedSuperclass annotation issue

See original GitHub issue

Hi, I am using 1.11.03 and I have the spring configuration in xml in this way:

	<jpa:repositories base-package="my.package.datamodel.repositories"
	                  entity-manager-factory-ref="entityManagerFactory" />

I have some classes annotated with @MappedSuperclass and I have this issue:

java.lang.IllegalArgumentException: Not an entity: class com.liberologico.cloudesire.datamodel.entities.MetadataEntity
	at org.hibernate.metamodel.internal.MetamodelImpl.entity(
	at org.hibernate.metamodel.internal.MetamodelImpl.findEntityGraphsByType(
	at org.hibernate.internal.SessionFactoryImpl.findEntityGraphsByType(
	at org.hibernate.internal.SessionImpl.getEntityGraphs(
	at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke( [3 skipped]
	at com.sun.proxy.$Proxy166.getEntityGraphs(Unknown Source)
	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke( [3 skipped]
	at com.sun.proxy.$Proxy166.getEntityGraphs(Unknown Source)
	at [6 skipped]
	at com.sun.proxy.$Proxy169.getEntityGraphs(Unknown Source) [2 skipped]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

reda-alaouicommented, Dec 1, 2017

Ok thanks for the feedback 👍

reda-alaouicommented, Nov 21, 2017

Hi @pimuzzo ,

Can you show me the used repository class and repository method call that generates this exception?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is the MappedSuperClass annotation no longer valid in ...
The mapping is incorrect according to the JPA 2.2 specification, @MappedSuperclass and @Inheritance cannot be used together. · To solve the issue ...
Read more >
How to inherit properties from a base class entity using ...
The JPA standard specification defines the @MappedSuperclass annotation to allow an entity to inherit properties from a base class.
Read more >
Wrong inspection error when using `@MappedSuperclass` in ...
This issue is originally about the case, that Entity classes with Id field defined in their superclasses [annotated with @MappedSuperclass ] are marked...
Read more >
MappedSuperclass (Java EE 5 SDK) - Oracle Help Center
Mapping information may be overridden in such subclasses by using the AttributeOverride and AssociationOverride annotations or corresponding XML elements.
Read more >
Mapped superclass in JPA on
This annotation is @MappedSuperclass. This exceptions proves well that you can't manage JPA mapping in simple POJO classes, not annotated with @Entity or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found