Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No suitable driver found for 08001/0 #1965

Open
KiselevAlecksey opened this issue Nov 24, 2024 · 0 comments
Open

No suitable driver found for 08001/0 #1965

KiselevAlecksey opened this issue Nov 24, 2024 · 0 comments
Labels

Comments

@KiselevAlecksey
Copy link

Issue Description
I am encountering the error No suitable driver found for 08001/0 when I add the following dependency in Maven:

<dependency>
    <groupId>org.zalando</groupId>
    <artifactId>logbook-spring-boot-starter</artifactId>
    <version>3.7.2</version>
</dependency>

minimum maven dependencies for repeat

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>org.example</groupId>
    <artifactId>test</artifactId>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.zalando</groupId>
            <artifactId>logbook-spring-boot-starter</artifactId>
            <version>3.7.2</version>
        </dependency>
    </dependencies>

Expected Behavior
I expected to be able to access the H2 console.

Actual Behavior
Instead, the following error occurs:

java.sql.SQLException: No suitable driver found for
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:708)
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
    at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:335)

Possible Fix
It is necessary to check whether the JDBC driver for H2 is installed and correctly configured.

Steps to Reproduce

  1. Add the dependency in Maven.
  2. Attempt to access the H2 console.

Context
The goal is to connect to the H2 console to work with the database.

Your Environment
Version used: 3.7.2

* StackOwerflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant