I met below exception while developing kafka consumer.
java.sql.SQLException: No suitable driver found for jdbc:<db_name>://<server>:<port>/<db>
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at co.kr.realtimetech.sql.KairosDBHandler.<init>(DBHandler.java:20)
at co.kr.realtimetech.consumer.streamer.StreamerFactory.start(StreamerFactory.java:44)
at co.kr.realtimetech.Main.main(Main.java:18)
Actually, it is really simple and basic error...
Add Class.forName to load the driver class like below.
WRITTEN BY
- pf1999
프로그래밍 도중 삽질하다가 해결한 내용 공유용 블로그
,