question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, May 10, 2017

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.

0reactions
vijaidhascommented, May 10, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found