Project-ECI|Oracleフェイルオーバグループ

3407 ワード

1.could not extract ResultSet


org.hibernate.exception.SQLGrammarException: could not extract ResultSet]

  • データベースが存在しない場合はエラーと呼びます
  • 데이터베이스에 해당 테이블이 없어서 발생되는 문제

  • ヘルプスタックオーバーフロー:https://stackoverflow.com/questions/68785056/could-not-extract-resultset-problem-with-oracle-database

  • スプリング起動-注意:
    https://springframework.guru/configuring-spring-boot-for-oracle/
  • Spring Boot Basic Configuration for Oracle
    Spring Boot Properties
    Configuring a different datasource in Spring Boot is very simple. When you supply datasource properties in Spring Boot’s application.properties file, Spring Boot will use them to configure the datasource. To configure Spring Boot for Oracle, add the following lines to your properties file.
    #Basic Spring Boot Config for Oracle
    spring.datasource.url= jdbc:oracle:thin:@//spring.guru.csi0i9rgj9ws.us-east-1.rds.amazonaws.com:1521/ORCL
    spring.datasource.username=system
    spring.datasource.password=manager
    spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
    #hibernate config
    spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
    Spring Boot Advanced Configuration for Oracle
    Oracle is a highly advanced and highly configurable RDBMS. There is a reason Oracle is the #1 database in the enterprise. The basic example above will work for just about any JDBC data source you need to configure for use with Spring Boot. They will all have a url, user name, password, and driver class. But with Oracle, there are a number of advanced properties you may need to set. Especially if you’re using Oracle RAC.
    Spring Boot will set vendor specific properties using spring.datasource.. And you absolutely can go this route. However, based on my experience, it might be time to switch to a Java based configuration. Spring Boot will create the data source from just the properties file, or will forgo the automatic data source creation if you’re doing a more traditional method in Spring to define the data source bean.
    In this section, I’m going to show you how to use a Spring configuration bean to create the Oracle JDBC datasource.
    Oracle Properties
    In this example, I’m going to show you how to externalise the Oracle connection properties to a properties file.
    In our Spring Boot application.properties file we want to set the following properties.
    #Oracle connection
    oracle.username=system
    oracle.password=manager
    oracle.url=jdbc:oracle:thin:@//spring.guru.csi0i9rgj9ws.us-east-1.rds.amazonaws.com:1521/ORCL
    Next, on our Configuration class for Oracle, we want to add the following annotation:

    2.整合性エラー


    ORA-00001: unique constraint (ECI2.UK_TJX3YIGQVKPOOIXVCHECMCPT3) violated
    https://itprogramming119.tistory.com/entry/Oracle-Error-ORA-00001-unique-constraint-violated
    繰り返しキー値のデータが生成されるので、エラーが発生しました.データを交換すればいいです.