• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Exception while testing JDBC connection

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is my sample code to test JDBC connection. Earlier it used to work.




but i dont know what went wrong I am getting below exception.

 
Sheriff
Posts: 27525
88
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Line 11 says "I'm going to use Sun's antique JDBC-ODBC driver".

Line 13 says "Connect to that driver using this Oracle JDBC URL".

Evidently the JDBC-ODBC driver doesn't understand what to do with that, so it throws an exception. I'd suggest choosing one driver or the other and writing the appropriate code for that driver.

(And it isn't clear to me what part Spring plays in this problem, so I'll put the post into the JDBC forum as well. It might get better answers there.)
 
somashaker goud
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul for your help !
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Paul says, that driver hasn't seen any work done on it for over 15 years, and even then it was only intended as an example of a JDBC Driver and not really supposed to be used.

Any modern database has a JDBC Driver written specifically for it, so you should always find the driver related to the db you are using.
 
reply
    Bookmark Topic Watch Topic
  • New Topic