我有以下错误:
Caused by: java.sql.SQLException: Desbordamiento Numérico
at oracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:4139)
at oracle.jdbc.driver.NumberCommonAccessor.getLong(NumberCommonAccessor.java:636)
at oracle.jdbc.driver.GeneratedStatement.getLong(GeneratedStatement.java:208)
at oracle.jdbc.driver.GeneratedScrollableResultSet.getLong(GeneratedScrollableResultSet.java:261)
at oracle.jdbc.driver.GeneratedResultSet.getLong(GeneratedResultSet.java:560)
at com.zaxxer.hikari.pool.HikariProxyResultSet.getLong(HikariProxyResultSet.java)
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.resultSetMinValue(SequenceInformationExtractorLegacyImpl.java:115)
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.lambda$extractMetadata$0(SequenceInformationExtractorLegacyImpl.java:55)
at org.hibernate.tool.schema.extract.spi.ExtractionContext.getQueryResults(ExtractionContext.java:50)
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:39)
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:66)
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:60)
at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:183)
... 127 common frames omitted
字符串
我试过更改不同版本的JDBC驱动程序。
这些是我的财产:
# BBDD
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#spring.datasource.url=jdbc:oracle:thin:@test:1521:orcl
spring.datasource.url=jdbc:oracle:thin:@test:1521/orcl
spring.datasource.username=TEST1
spring.datasource.password=TEST1
spring.jpa.database-platform=org.hibernate.dialect.OracleDialect
#spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
#spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect
#spring.jpa.database-platform=org.hibernate.dialect.Oracle9iDialect
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
型
(我已经尝试了几种方言和评论车道驱动程序类和平台)
这些是我的模型类:
@Entity
public class Configuracion extends Base implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotNull
@Length(max=32)
private String clave;
@NotNull
@Length(max=512)
private String valor;
}
x
@Entity
public class Callback extends Base implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String ine10;
private String nombre;
@NotNull
private String org;
@NotNull
private String entity;
@NotNull
private String user;
@Column(length = 2048)
private String pass;
@NotNull
private String key;
@Entity
public class Entidad Base implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotNull @ManyToOne @JoinColumn
private Entidad entidad;
@NotNull @Length(max=12)
private String aplicacion;
@Length(max=24)
private String origen;
@Length(max=256)
private String clave;
@Lob
private String peticion;
@Lob
private String respuesta;
的一种或多种
在我的前提下,它可以正常工作,指向安装在docker中的Oracle 21g。它不工作的地方是在具有19g的客户端上。
Oracle 19.0.0.0版本的数据库。
我唯一希望的是应用程序启动,我已经翻译了Oracle抛出的查询,我已经手动运行它们,它们可以工作。
1条答案
按热度按时间hfyxw5xn1#
既然您有spring.jpa.show-sql=true,那么您可以尝试直接在数据库中执行该SQL(通过sqldeveloper或类似工具)并检查它是数据库还是驱动程序的方言吗?