Error because "embeddableClass" is null

Hi,
I am using spring boot 3.2.3 and spring data jpa 3.2.3 .
While making service up getting below error. I have used @Embeddable and @EmbeddedId for composite primary keys. It was working till 2.7.18 spring boot versoin.

2024-04-19 18:03:58,019 narration-services   ERROR main org.springframework.boot.SpringApplication Application run failed
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Cannot invoke "org.hibernate.annotations.common.reflection.XClass.isAnnotationPresent(java.lang.Class)" because "embeddableClass" is null
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1231)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:949)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
	at com.fyndna.narration.NarrationServiceApplication.main(NarrationServiceApplication.java:22)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
	at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58)
Caused by: java.lang.NullPointerException: Cannot invoke "org.hibernate.annotations.common.reflection.XClass.isAnnotationPresent(java.lang.Class)" because "embeddableClass" is null
	at org.hibernate.boot.model.internal.PropertyBinder.resolveCustomInstantiator(PropertyBinder.java:381)
	at org.hibernate.boot.model.internal.PropertyBinder.getOrCreateCompositeId(PropertyBinder.java:363)
	at org.hibernate.boot.model.internal.PropertyBinder.bind(PropertyBinder.java:312)
	at org.hibernate.boot.model.internal.PropertyBinder.makePropertyAndBind(PropertyBinder.java:292)
	at org.hibernate.boot.model.internal.EmbeddableBinder.createEmbeddedProperty(EmbeddableBinder.java:247)
	at org.hibernate.boot.model.internal.EmbeddableBinder.createCompositeBinder(EmbeddableBinder.java:120)
	at org.hibernate.boot.model.internal.PropertyBinder.bindBasic(PropertyBinder.java:1045)
	at org.hibernate.boot.model.internal.PropertyBinder.bindProperty(PropertyBinder.java:890)
	at org.hibernate.boot.model.internal.PropertyBinder.buildProperty(PropertyBinder.java:788)
	at org.hibernate.boot.model.internal.PropertyBinder.processElementAnnotations(PropertyBinder.java:709)
	at org.hibernate.boot.model.internal.EntityBinder.processIdPropertiesIfNotAlready(EntityBinder.java:1041)
	at org.hibernate.boot.model.internal.EntityBinder.handleIdentifier(EntityBinder.java:357)
	at org.hibernate.boot.model.internal.EntityBinder.bindEntityClass(EntityBinder.java:237)
	at org.hibernate.boot.model.internal.AnnotationBinder.bindClass(AnnotationBinder.java:423)
	at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:256)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:279)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:322)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503)
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75)
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:388)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396)
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:364)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
	... 21 common frames omitted

Any idea what is causing this error ? Thanks in advance.

This is not a Spring forum and I have no idea what Hibernate ORM version Spring uses. You also didn’t post the entity model that you’re using which causes this. When you include so little information in a question you won’t find any answers.

@Prateek_Pagaria , were you able to resolve this issue with embeddedClass is null ? I am also getting the same error and using spring 3.+ and Hibernate 6.0+.
Here are my embeddable classes.

@Embeddable
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@DynamicUpdate
public class AddressCompositeKey implements Serializable {

    private static final long serialVersionUID = 1234567L;

    @Column(name = "column1_id")
    private UUID column1Id;

    @Column(name = "code")
    private String code;
}

@Entity(name = "address")
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Address {

 @EmbeddedId
 private AddressCompositeKey addressCompositeKey;
}