java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception comes inwards Java 8 because it has removed the JDBC ODBC couple driver shape "sun.jdbc.odbc.jdbcodbcdriver" from JDK as well as JRE. This shape is required to connect whatever database using Object database connectivity driver e.g. Microsoft Access, but unfortunately y'all cannot usage it from JDK 8 onward. In gild to solve this error, simply use Jackcess library or a commercial driver similar HXTT. Normally, inwards pre Java 8 world, java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver fault comes when you try to connect to Microsoft Access database from Java using JDBC as well as JDBC ODBC couple driver is non available inwards classpath. If y'all remember, In gild to opened upwardly SQL connecter to database, get-go measuring is to charge as well as register the driver. In gild to charge driver, nosotros usage Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); as well as this method throws java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver, if ClassLoader is non able to notice the requested shape (sun.jdbc.odbc.JdbcOdbcDriver) in CLASSPATH. In gild to connect to MS Access, nosotros ask type 1 JDBC driver, too known every bit JDBC ODBC couple driver as well as the shape inwards question, JdbcOdbcDriver is driver implementation to connect to Open database connectivity driver installed inwards machine.
Just yell upwardly that sun.jdbc.odbc.JdbcOdbcDriver is a measure shape from JDK API as well as it doesn't come upwardly alongside whatever external JAR similar other vendor database's JDBC drivers e.g. JDBC driver to connect Oracle database comes on ojdbc6.jar as well as MySQL driver comes in mysql-connector-java-5.1.23-bin.jar. JdbcOdbcDriver class is introduce inwards rt.jar, which is e'er included inwards Classpath, every bit this JAR file is usage of the JRE.
Many newbie inwards Java programming prefer to connect to MS Access database from Java hence bigger database similar Oracle, SQL Server or MySQL. Even I bring done the same when I get-go started learning JDBC, master copy argue for that was MS ACCESS comes every bit usage of Microsoft Office as well as was available inwards my machine. I didn't bring to become alongside hurting involved on installing Oracle, SQL Server or MySQL database, sometime fifty-fifty y'all don't fifty-fifty bring administrator access inwards your auto to exercise that. BTW, at that spot are several disadvantage of using JDBC ODBC Bridge driver, get-go it require ODBC driver to travel installed inwards your machine, minute it makes your code platform dependent. Using pure Java type four JDBC driver is best agency to connect commercial database from Java programs. Almost all major database vendor provides type four JDBC driver directly days, hence its simply affair of finding correct version as well as dropping that JAR inwards classpath.
That's all about java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception inwards Java 8. JDBC-ODBC couple driver is buggy, irksome as well as unsupported inwards many platforms, it may non fifty-fifty travel available fifty-fifty inwards 64-bit Windows versions. You volition acquire this exception if y'all sweat to connect to Microsoft Access database shape Java 8 JRE or JVM, because JDBC-ODBC couple driver is directly removed. Consider using type four JDBC, pure Java driver alongside existent database or if y'all withal desire to connect to MS access, use Jackcess library or a commercial driver similar HXTT.
Further Learning
JSP, Servlets as well as JDBC for Beginners: Build a Database App
Complete JDBC Programming Part 1 as well as 2
Java Platform: Working alongside Databases Using JDBC
Just yell upwardly that sun.jdbc.odbc.JdbcOdbcDriver is a measure shape from JDK API as well as it doesn't come upwardly alongside whatever external JAR similar other vendor database's JDBC drivers e.g. JDBC driver to connect Oracle database comes on ojdbc6.jar as well as MySQL driver comes in mysql-connector-java-5.1.23-bin.jar. JdbcOdbcDriver class is introduce inwards rt.jar, which is e'er included inwards Classpath, every bit this JAR file is usage of the JRE.
Many newbie inwards Java programming prefer to connect to MS Access database from Java hence bigger database similar Oracle, SQL Server or MySQL. Even I bring done the same when I get-go started learning JDBC, master copy argue for that was MS ACCESS comes every bit usage of Microsoft Office as well as was available inwards my machine. I didn't bring to become alongside hurting involved on installing Oracle, SQL Server or MySQL database, sometime fifty-fifty y'all don't fifty-fifty bring administrator access inwards your auto to exercise that. BTW, at that spot are several disadvantage of using JDBC ODBC Bridge driver, get-go it require ODBC driver to travel installed inwards your machine, minute it makes your code platform dependent. Using pure Java type four JDBC driver is best agency to connect commercial database from Java programs. Almost all major database vendor provides type four JDBC driver directly days, hence its simply affair of finding correct version as well as dropping that JAR inwards classpath.
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver inwards Java 8
JDBC-ODBC couple driver has been marked every bit "don't use" for the concluding decade or so. It was introduce inwards Java vii liberate but removed from Java 8 liberate onward. It powerfulness too non travel available on non-Windows JVMs, every bit it makes no feel to bring an ODBC-JDBC couple driver on platforms on which ODBC does non be e.g. Linux or Mac OS. Here is the stacktrace of the fault y'all acquire :java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:30 at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:259)
That's all about java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception inwards Java 8. JDBC-ODBC couple driver is buggy, irksome as well as unsupported inwards many platforms, it may non fifty-fifty travel available fifty-fifty inwards 64-bit Windows versions. You volition acquire this exception if y'all sweat to connect to Microsoft Access database shape Java 8 JRE or JVM, because JDBC-ODBC couple driver is directly removed. Consider using type four JDBC, pure Java driver alongside existent database or if y'all withal desire to connect to MS access, use Jackcess library or a commercial driver similar HXTT.
Related JDBC Tutorials as well as troubleshooting guide :
- General Guide to solve java.lang.ClassNotFoundException inwards Java [guide]
- How to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver inwards Java MySQL? [solution]
- How to create java.lang.ClassNotFoundException: org.postgresql.Driver fault inwards Java? [solution]
- How to create java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver Error inwards Java? [solution]
- java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory? [solution]
- How to solve java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver inwards Java? [solution]
- How to connect Oracle database from Java Program? (example)
- How to solve java.lang.unsatisfiedlinkerror no ocijdbc11 inwards java.library.path? (solution)
Further Learning
JSP, Servlets as well as JDBC for Beginners: Build a Database App
Complete JDBC Programming Part 1 as well as 2
Java Platform: Working alongside Databases Using JDBC