MappedSuperclass annotation issue
See original GitHub issueHi,
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"
factory-class="com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphJpaRepositoryFactoryBean"
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(MetamodelImpl.java:456)
at org.hibernate.metamodel.internal.MetamodelImpl.findEntityGraphsByType(MetamodelImpl.java:687)
at org.hibernate.internal.SessionFactoryImpl.findEntityGraphsByType(SessionFactoryImpl.java:545)
at org.hibernate.internal.SessionImpl.getEntityGraphs(SessionImpl.java:3856)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:347) [3 skipped]
at com.sun.proxy.$Proxy166.getEntityGraphs(Unknown Source)
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:298) [3 skipped]
at com.sun.proxy.$Proxy166.getEntityGraphs(Unknown Source)
at com.cosium.spring.data.jpa.entity.graph.repository.support.RepositoryEntityManagerEntityGraphInjector.invoke(RepositoryEntityManagerEntityGraphInjector.java:59) [6 skipped]
at com.sun.proxy.$Proxy169.getEntityGraphs(Unknown Source) [2 skipped]
at com.cosium.spring.data.jpa.entity.graph.repository.support.RepositoryMethodEntityGraphExtractor$JpaEntityGraphMethodInterceptor.findDefaultEntityGraph(RepositoryMethodEntityGraphExtractor.java:88)
at com.cosium.spring.data.jpa.entity.graph.repository.support.RepositoryMethodEntityGraphExtractor$JpaEntityGraphMethodInterceptor.<init>(RepositoryMethodEntityGraphExtractor.java:79)
at com.cosium.spring.data.jpa.entity.graph.repository.support.RepositoryMethodEntityGraphExtractor.postProcess(RepositoryMethodEntityGraphExtractor.java:46)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top 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 waitingforcode.com
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok thanks for the feedback 👍
Hi @pimuzzo ,
Can you show me the used repository class and repository method call that generates this exception?