簡體   English   中英

Spring Boot Informix Jpa 連接

[英]Spring Boot informix Jpa connection

我正在嘗試使用 informix RDBMS 和 Spring boot 創建一個 Web 服務應用程序。

當我聲明ddl-auto = create它運行良好,但是當我將其更改為updatenone我收到錯誤消息。 我的informix 版本是9.40.UC8 版。

spring.datasource.url=jdbc:informix-sqli://*.*.*.*:*/testechange:INFORMIXSERVER=server
spring.datasource.username=
spring.datasource.password=

spring.datasource.tomcat.max-wait=20000
spring.datasource.tomcat.max-active=50
spring.datasource.tomcat.max-idle=20
spring.datasource.tomcat.min-idle=15

spring.datasource.driver-class-name=com.informix.jdbc.IfxDriver
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.InformixDialect
spring.jpa.properties.hibernate.id.new_generator_mappings = false
spring.jpa.properties.hibernate.format_sql = true
spring.jpa.hibernate.ddl-auto=update

logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 

server.port=8182
@Entity
@Table(name ="todos")
public class Todo {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer  id  ; 

    @Column
    private  String name   ;
}
    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.ibm.informix/jdbc -->
        <dependency>
            <groupId>com.ibm.informix</groupId>
            <artifactId>jdbc</artifactId>
            <version>4.10.6.20151104</version>
        </dependency>
    </dependencies>

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.GenericJDBCException: Error accessing tables metadata

Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Error accessing tables metadata

Caused by: org.hibernate.exception.GenericJDBCException: Error accessing tables metadata
Caused by: java.sql.SQLException: Routine (get_data_type) can not be resolved.*

當您使用 update 時,您表示您將通過 spring 獲得的連接將是動態的,您可以在進行更改時接收更改。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM