[英]Migrating Spring boot JPA(MySQL) to JPA(PostgreSQL) throws an ERROR
我有一個使用JPA的Spring Boot Web應用程序,而MySQL是數據庫。 我必須從MySQL數據庫遷移到PostgreSQL。 將PostgreSQL配置為應用程序時,某些表(實體)會導致ERROR。
JPA的“創建”選項正常運行。 但是將create更改為“ update”時,程序將終止並顯示錯誤。
錯誤是
'列i.indproc不存在提示:也許您想引用“ i.indpred”列。 位置:610'
ERROR 31134 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory'..... [PersistenceUnit: default] Unable to build Hibernate SessionFactory at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
n.SQLGrammarException: Error accessing index information: table_user
Caused by: org.postgresql.util.PSQLException: ERROR: column i.indproc does not exist
我遇到了類似的錯誤。 將postgreql maven依賴升級到最新版本可修復我的錯誤。 在2019年8月
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.6</version>
</dependency>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.