I am trying to create a web service application using informix RDBMS and Spring boot.
When I declare ddl-auto = create
it works perfectly but when I change it to update
or none
I get the error. My informix version is Version 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 获得的连接将是动态的,您可以在进行更改时接收更改。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.