Issue
I am working on java EE. I am using intellij idea ultimate. I am trying to connect to the database. But when i try to connect using the command line in a another project it didn't give any error but when i try to do same thing in an EE app it shows me error. In this app i actually wants to read data from browser and verify it from the database. But whenever i try to connect it using EE it shows me this error. This is my project structure
Solution
Is your driver loaded? Classes are lazy loaded in java, so unless you have a code doing that for you you have to call Class.forName("<driver class name>");
at least once to load the driver. In your case Class.forName("org.sqlite.JDBC");
Doing that will initialize the driver for JDBC (all JDBC drivers have static initializers).
Answered By - Enerccio
Answer Checked By - Clifford M. (JavaFixing Volunteer)