Cannot Connect Spring Boot Application to IBM Informix Database
Asked Answered
D

2

6

I cannot connect my spring boot application to IBM Informix database. I have added the informix data source in application.yml file.

I am using spring 4.

I get the following error.

no writeable property 'url' in class com.informix.jdbcx.IfxXADataSource

spring.profiles.active: db_dummy


spring.mvc.view:
    prefix: /WEB-INF/jsp/
    suffix: .jsp


spring.messages.basename: static/resources/messages/pjMessageResource, static/resources/messages/pymacMessageResource, static/resources/messages/messageResource, static/resources/messages/base


spring.datasource:
    url: jdbc:informix-sqli://x.x.x.x:9093/testdb:informixserver=myserver;
    driverClassName: com.informix.jdbc.IfxDriver
    username: informix
    password: sss
    xa:
        dataSourceClassName: com.informix.jdbcx.IfxXADataSource


#----------------------------------------------------------  


security.basic.enabled: false

spring.jackson.serialization.INDENT_OUTPUT: true


server.error.whitelabel.enabled: false


management:
    context-path: /_mep
    security.enabled: false
    #security.role: SUPERUSER


multipart.maxFileSize: 10Mb

spring:
    jpa:
        openInView: true
        show-sql: false
        properties:
            hibernate:
                connection.charSet: UTF-8
                format_sql: true
                use_sql_comments: true
                jdbc:
                    batch_size: 30
                    fetch_size: 100
            jadira:
                usertype:

                    autoRegisterUserTypes: true
                    javaZone: jvm
                    databaseZone: jvm





---

#----------------------------------------------------------------
# development
#----------------------------------------------------------------
spring.profiles: development


secondary.datasource:
    url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
    driverClassName: org.h2.Driver
    username: sa
    password:
    xa:
        dataSourceClassName: org.h2.jdbcx.JdbcDataSource
#----------------------------------------------------------



---
#----------------------------------------------------------------
# staging   or  production
#----------------------------------------------------------------
spring.profiles: staging,production


spring.jpa.database_platform: org.hibernate.dialect.InformixDialect




---
#----------------------------------------------------------------
# psql
#----------------------------------------------------------------
spring.profiles: informix

spring.datasource:
    url: jdbc:informix-sqli://x.x.x.x:9093/aaa:informixserver=test;
    driverClassName: com.informix.jdbc.IfxDriver
    username: informix
    password: 
    xa:
        dataSourceClassName: com.informix.jdbcx.IfxXADataSource




---
#----------------------------------------------------------------
# h2
#----------------------------------------------------------------
spring.profiles: h2

spring.datasource:
    url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
    driverClassName: org.h2.Driver
    username: sa
    password:
    xa:
        dataSourceClassName: org.h2.jdbcx.JdbcDataSource
Druce answered 23/9, 2016 at 8:34 Comment(0)
R
0

have you included the jars named 1)ifxjdbc & 2)ifxjdbcx jars.

Rookery answered 23/9, 2016 at 9:32 Comment(0)
P
-1

in pom add Informix with releated versionID as dependencies.

<dependency>
            <groupId>com.ibm.informix</groupId>
            <artifactId>jdbc</artifactId>
            <version>{versionID}</version>
</dependency>
Prolific answered 25/2, 2019 at 5:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.