【问题标题】:Springboot Application startup failed due to OutOfMemoryError: Java heap space (Unable to create entityManagerFactory Bean)Springboot Application 启动失败,OutOfMemoryError: Java heap space (Unable to create entityManagerFactory Bean)
【发布时间】:2019-12-30 12:17:39
【问题描述】:

我们正在使用 Spring Boot 版本 2.1.3 并启动了 sprintboot jpa。

应用程序在启动时失败并显示日志:

注入 ScanOptions [org.hibernate.boot.archive.scan.internal.StandardScanOptions@78d49939] 进入引导上下文;曾是 [org.hibernate.boot.archive.scan.internal.StandardScanOptions@21f27bb5]
上下文初始化期间遇到异常 - 取消 刷新尝试: org.springframework.beans.factory.BeanCreationException:错误 创建在类路径中定义的名称为“entityManagerFactory”的bean 资源 [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: 调用 init 方法失败;嵌套异常是 java.lang.OutOfMemoryError: Java 堆空间

堆内存:512 MB。

休眠属性:

spring.jpa:
database: ORACLE
show-sql: true
generate-ddl: false
hibernate:
  ddl-auto: none
properties:
  hibernate:
    dialect: org.hibernate.dialect.Oracle10gDialect
    id:
      new_generator_mappings: true
    show_sql: false
    connection:
      autocommit: true
      release_mode: after_transaction

使用 ojdbc7。

我们间歇性地遇到此问题。

【问题讨论】:

    标签: spring-boot spring-data-jpa


    【解决方案1】:

    此错误纯粹与堆内存有关。在启动时增加堆内存后,它运行良好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-30
      • 2011-06-07
      • 2015-05-22
      • 1970-01-01
      相关资源
      最近更新 更多