skip to Main Content

java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null – Mysql

`HTTP Status 500 – Internal Server Error Type Exception Report Message Request processing failed: java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception jakarta.servlet.ServletException: Request processing…

VIEW QUESTION

Entity not creating table in DB – Postgresql

I'm using Spring boot, and I Run this model. package com.example.demo.Models; import jakarta.persistence.*; @Entity @Table(name = "user") public class UserModel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(unique = true, nullable = true) private Long id; private String name; private String email;…

VIEW QUESTION

Spring boot unable to create database schema and insert values on load at MYSQL

I'm unable to get spring boot to automatically load my database schema when I start it up. I am using MySQL as an external DB. Please find below the code application properties spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.hibernate.ddl-auto=update spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/carsdb spring.datasource.username=root spring.datasource.password=password Application.java package…

VIEW QUESTION
Back To Top
Search