Skip to content

java.lang.IllegalStateException: Unable to detect database type for Sybase Datasource #9147

@vijaidhas

Description

@vijaidhas

I am getting the Unable to detect database type for Sybase Datasource configured in my spring boot application.

Spring boot version: 1.5.3

application.properties

spring.datasource.url=jdbc:jtds:sybase://db-server-name:5555/DBNAME
spring.datasource.username=db_user
spring.datasource.password=db_password
spring.datasource.driver-class-name=net.sourceforge.jtds.jdbc.Driver

spring.jpa.database=sybase
spring.jpa.database-platform=org.hibernate.dialect.SybaseDialect

Debug Information:

// line number 75 in AbstractDatabaseInitializer class
String productName = JdbcUtils.commonDatabaseName(JdbcUtils
					.extractDatabaseMetaData(this.dataSource, "getDatabaseProductName")
					.toString());
// productName is returned as Sybase from JdbcUtils.extractDatabaseMetaData
DatabaseDriver databaseDriver = DatabaseDriver.fromProductName(productName);
// but there is no databaseDriver found and is returned as UNKNOWN. 
// There is no Sybase database configured in DatabaseDriver enum

There is no Sybase datasource configured in DatabaseDriver enum. Can you quickly help to fix this issue ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.com

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions