This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
error :
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbcracle:thin:@localhost:1521:CON
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.cls.demo.JdbcDemo.main(JdbcDemo.java:35)
Why i am keep getting this Exception ?? What's Wrong
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc: oracle:thin:@localhost:1521:CON
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.cls.demo.JdbcDemo.main(JdbcDemo.java:35)
You get this error because you did not make the oracle jdbc thin driver library available when running your program.
Download the Oracle jdbc library.
add it to the classpath when running your program.
This line of code seems odd : Class class1 = ClassLoader.getSystemClassLoader().loadClass("oracle.jdbc.driver.OracleDriver");
Where did you learn to load a driver class that way?
Jan Cumps wrote:You get this error because you did not make the oracle jdbc thin driver library available when running your program.
Download the Oracle jdbc library.
add it to the classpath when running your program.
I have Added.
Jan Cumps wrote:This line of code seems odd : Class class1 = ClassLoader.getSystemClassLoader().loadClass("oracle.jdbc.driver.OracleDriver");
Where did you learn to load a driver class that way?