java.lang.IllegalStateException: Unable to detect database type for Sybase Datasource
See original GitHub issueI 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 ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Spring boot 2.6.0 'integrationDataSourceInitializer' throws is ...
Spring boot 2.6.0 'integrationDataSourceInitializer' throws is java.lang.IllegalStateException: Unable to detect database type #28897.
Read more >Unable to detect database type - spring boot - Stack Overflow
I'm trying to create a Spring Boot application using sqljdbc4 driver with this config: spring: datasource ...
Read more >Spring Boot - Cannot determine embedded database driver ...
Cannot determine embedded database driver class for database type NONE. This error comes when you don't have a DataSource configured for ...
Read more >java.lang.IllegalStateException: Unable to detect database ...
Coding example for the question java.lang.IllegalStateException: Unable to detect database type for Sybase datasource-Springboot.
Read more >Using Postgres: 'Unable to detect database type'.
Caused by: java.lang.IllegalStateException: Unable to detect database type at org.springframework.util.Assert.state(Assert.java:76).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There’s no need to post anything on Stack Overflow now. I’ve already explained what to do in my comment above. We can’t detect a product name when you use the jTDS driver as it supports more than one database (SQL Server and Sybase, IIRC). This is already described in the javadoc for
DatabaseDriver.Hi Wilkinsona, Thanks for your response, I thought that this would be an issue as the driver is not listed in DatabaseDriver enum. As it is very urgent and seemed to be an issue , I posted it here. I will post it in Stack overflow as well. Will come back if it really an issue.
-Vijai