Пытаюсь запустить приложение, выдает ошибку связанную БД

предполагаю, что ошибка кроется где-то здесь:

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "users")
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
    private String email;
    private String hashPassword;

    @Enumerated(value = EnumType.STRING)
    private Role role;

}

моя БД:

create table users
(
    id           int auto_increment
        primary key,
    name         varchar(45)            not null,
    email        varchar(45)            not null,
    hashPassword varchar(45)            not null,
    role         enum ('USER', 'ADMIN') null
);

Сама ошибка

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:1236)

The following method did not exist:

    javax.persistence.Table.indexes()[Ljavax/persistence/Index;

The method's class, javax.persistence.Table, is available from the following locations:

    jar:file:/home/tanya/IdeaProjects/kfu-programming-java4/spring_shelter/lib/javax.persistence.jar!/javax/persistence/Table.class
    jar:file:/home/tanya/.m2/repository/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar!/javax/persistence/Table.class

It was loaded from the following location:

    file:/home/tanya/IdeaProjects/kfu-programming-java4/spring_shelter/lib/javax.persistence.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.Table

Ответы (1 шт):

Автор решения: Таня

Разобралась сама, так как у меня unix система, в application.properties в поле порта нужно прописывать 8080, а у меня было 80 - а он занят на таких системах, отсюда и ошибка

→ Ссылка