2

I'm trying to connect to an impala db in spring boot, however I've been getting various errors such as Cannot determine embedded database driver class for database type NONE

I have been trying to debug the errors. For this error, I tried specifying the class from another post, but it did not fix the problem

I have the jdbc jars located in the project, and am able to connect with them when not using spring-boot

Code

application.properties

where myHost is a server running the impala daemon

app.datasource.url=jdbc:impala://myHost:21050/default;auth=noSasl
app.datasource.driver-class-name=com.cloudera.impala.jdbc41.Driver

DemoApplication.java (main class)

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {
    public static void main(String[] args) {
    SpringApplication.run(DemoApplication.class, args);
    }
}

ImpalaDao

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.sql.DataSource;

@Repository
public class ImpalaDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
}
Alter
  • 3,332
  • 4
  • 31
  • 56

1 Answers1

0

spring boot does not recognize the impala driver. In the autoconfigurations of spring Boot does not have autoconfiguracion of Impala. You have to configure it ad-hoc or make your own autoconfiguration.