F
F
Fedor unknown2021-09-08 07:25:30
Java
Fedor unknown, 2021-09-08 07:25:30

How to solve Error creating bean with name 'entityManagerFactory' defined in class path resource?

when starting the application there is a problem:
Error creating bean with name 'entityManagerFactory' defined in class path resource
how can I solve the problem? (Googled and found similar polls, but none of the solutions helped)
Entity:

@Entity
@Table(name = "todos")
@Data
public class Todo {

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private long id;

  private String userName;

  @Size(min = 10, message = "Enter at least 10 Characters...")
  private String description;

  private Date targetDate;
  
  public Todo() {
    super();
  }
}


dependencies:
<dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>3.3.6</version>
    </dependency>

    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap-datepicker</artifactId>
      <version>1.0.1</version>
    </dependency>

    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jquery</artifactId>
      <version>1.9.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey_USB, 2021-09-08
@Sergey_USB

And what is this
public Todo() {
super();
}
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question