• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent: Driver class loaded but getting no suitable driver found exception

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using "com.ibm.db2j.jdbc.DB2jXADataSource" driver class to connect to a Cloudscape database.

While the driver class gets successfully loaded, i get the following exception when DriverManager.getConnection(url):

java.sql.SQLException: No suitable driver
java.sql.DriverManager.getConnection(DriverManager.java:559)
java.sql.DriverManager.getConnection(DriverManager.java:211)
*********************

The url I specify is: jdbc erby atabaseName.

Can someone please help me with this urgently. Is this exception due to wrong URL but then shouldnt error message be for eg. connection failed etc?

Thank you.

Regards,
Sunil.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is this exception due to wrong URL but then shouldnt error message be for eg. connection failed etc?


Probably. The DriverManager looks for a driver which can support the URL you give it. If the URL is wrong, its not going to be able to find a driver.

Also "com.ibm.db2j.jdbc.DB2jXADataSource" looks like an XA DataSource, not a driver. Are you sure you are using the right class? The DB2jXADataSource will still need a Driver (which you get from DB2.jar)
 
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic