# Error: org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl Unable to get public no-arg constructor

**URL:** <https://discourse.hibernate.org/t/error-org-hibernate-bytecode-internal-bytebuddy-bytecodeproviderimpl-unable-to-get-public-no-arg-constructor/11283>\
**Category:** Hibernate ORM\
**Created:** [March 25, 2025, 11:08pm UTC](https://discourse.hibernate.org/t/error-org-hibernate-bytecode-internal-bytebuddy-bytecodeproviderimpl-unable-to-get-public-no-arg-constructor/11283 "2025-03-25T23:08:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonardocintra](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/leonardocintra/32/3934_2.png) [@leonardocintra](https://discourse.hibernate.org/u/leonardocintra)\
**Post date:** [March 25, 2025, 11:08pm UTC](https://discourse.hibernate.org/t/error-org-hibernate-bytecode-internal-bytebuddy-bytecodeproviderimpl-unable-to-get-public-no-arg-constructor/11283/1 "2025-03-25T23:08:34Z")

</div>

I created a project that consumes data from a queue in rabbitMQ. This part is all right and the application starts normally.

However, when I add the JPA + postgres dependency, the error below starts to appear:

Java: 21  
Spring Boot: 3.2.4  
Maven Project

```auto
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

```

Complete error

```auto
{"ts":"2025-03-25T22:54:52.389Z","logger":"org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext","severity":"WARN","thread":"main","message":"Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: org.hibernate.bytecode.spi.BytecodeProvider: org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl Unable to get public no-arg constructor"}

```

```auto
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "seller")
public class SellerEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    private String name;

    private String cnpj;
}

```

⚠I didn’t add any other configuration classes. By default, spring boot should connect to the database only with the data from the datasource in application.yml, right?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [March 26, 2025, 10:59am UTC](https://discourse.hibernate.org/t/error-org-hibernate-bytecode-internal-bytebuddy-bytecodeproviderimpl-unable-to-get-public-no-arg-constructor/11283/2 "2025-03-26T10:59:50Z")

</div>

This is not a Spring forum. Something is wrong with your setup or the way Spring uses Hibernate ORM. Ask in Spring forums.
