TransWikia.com

Google App Engine 500 internal server error

Server Fault Asked by Elyass Attachi on November 27, 2020

is there any way to solve this probleme but in my local m
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution

One Answer

There is a thread in Stackoverflow where this issue is discussed: To summarise, this is the configuration to implemented that worked.

Set manual configuration for JPA

@Bean 
public LocalSessionFactoryBean sessionFactory() {
    LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); 

    return sessionFactory;
}

JPA by default searches sessionFactory by name 'entityManagerFactory' so change the code to:

@Bean(name="entityManagerFactory")
public LocalSessionFactoryBean sessionFactory() {
    LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();

    return sessionFactory;
} 

Answered by iker lasaga on November 27, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP