Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

No suitable Driver Error  RSS feed

shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Error: org.hibernate.exception.JDBCConnectionException: Cannot open connection

This is what I did. I created a java project(DB) in myeclipse and added hibernate capabilities. I aslo created a and tested my hibernate
select statement. It worked fine. I then created a jar of the java project.

I added jar to to my struts project(miniStruts). i copied the jar to web-inf/lib. inside my action class i call the database access method i created in DB project. when i run my application it fails giving me No suitable driver error.

I have sqlserver drivers under web-inf/lib and also my DB.jar .

What am I missing?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!