Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:10:45+00:00 2026-06-15T08:10:45+00:00

I experience some strange errors with jdbc, SQLite and java’s DriveManager . According to

  • 0

I experience some strange errors with jdbc, SQLite and java’s DriveManager. According to the corresponding java docs, DriveManager is able to load needed drivers by himself, as long as jdbc is provided. However, for me this does not work when using SQLite:

Connection conn = DriverManager.getConnection("jdbc:sqlite://" + pathToFile + File.separator + "database.db");

When executing this code, I get an SQLException: No suitable driver found for jdbc:sqlite:pathToFile\database.db Normally I would assume that jdbc is not were it should be, but, for some reason, the following works:

Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://" + pathToFile + File.separator + "database.db");

Which leaves me completely clueless on why the first version does not work. As a side note, MySQL following the same implementation works fine without using Class.forName() too. Some help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:10:46+00:00Added an answer on June 15, 2026 at 8:10 am

    It depends on how the jdbc driver is implemented. In the “old” days, you always needed the Class.forNames() call before loading the driver. “modern” drivers implemented using the jdbc ServiceLoader support no longer require this. basically it comes down to whether or not the driver jar has the appropriate “META-INF/services/java.sql.Driver” entry.

    All of this is covered in the DriverManager javadocs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got some strange errors while develop some custom map overlays, anyone experience these?
After some experience with functional languages, I'm starting to use recursion more in Java
I have some experience writing web applications in Java for class projects. My first
I have some experience with Java , C , databases , networking etc..But anything
I had some experience of android but know almost nothing of GCC Makefile. Here
I have some experience using parallel extensions in .Net development, but I was looking
I have some experience in ASP.Net and can work my way around it without
Hi I have some experience with programming but I'm not very good with pointers.
Hope that someone can share their experience with some of the latest emerging backbone.js
I'm doing some homework and while I have some experience with SML, Haskell has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.