skip to Main Content

Using Two PostgreSQL Databases in the Same Project

I'm facing the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'comissionamentoEntityManagerFactory' defined in class path resource [coruripe/comissionamento/config/ComissionamentoConfig.class]: [PersistenceUnit: comissionamento] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName. I am working on a project…

VIEW QUESTION

EclipseLink configuration for MongoDB

I am getting following exception: java.lang.ClassCastException: class org.eclipse.persistence.sessions.DatabaseRecord cannot be cast to class org.eclipse.persistence.oxm.record.XMLRecord (org.eclipse.persistence.sessions.DatabaseRecord and org.eclipse.persistence.oxm.record.XMLRecord are in unnamed module of loader 'app') Cause: class org.eclipse.persistence.sessions.DatabaseRecord cannot be cast to class org.eclipse.persistence.oxm.record.XMLRecord (org.eclipse.persistence.sessions.DatabaseRecord and org.eclipse.persistence.oxm.record.XMLRecord are in unnamed module…

VIEW QUESTION

Postgresql – Using an @Entity in an @IdClass as @Id

I have an entity that looks like this @Entity @IdClass(AId.class) class A { @Id private String userName @Id @NotNull @JoinColumn(name = "location_id", referenceColumnName = "id", nullable=false, foreignKey = @ForeignKey(name = ...)) private Location location; private String userInformation; } The class…

VIEW QUESTION

Postgresql – DB lock with any isolation is not working as expected in Spring boot JPA application

I have a simple database table (PostgreSql) with the following data In the spring boot JPA application, the corresponding Entity class for this table is defined as follows import java.time.LocalDateTime; import org.hibernate.annotations.UpdateTimestamp; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; import lombok.AllArgsConstructor;…

VIEW QUESTION

Postgresql – Spring JPA with docker compose: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' or 'hibernate.dialect'

I am unable to connect my spring boot application to a PostgreSQL database using Spring JPA. Below is my application.yaml file. spring: application: name: jaah datasource: url: jdbc:postgresql://db:5432/taah username: waah password: blah driverClassName: org.postgresql.Driver jpa: database-platform: org.hibernate.dialect.PostgreSQLDialect hibernate: ddl-auto: update…

VIEW QUESTION
Back To Top
Search