Jump to content
Changes to the Jaspersoft community edition download ×

No suitable driver found


robbr

Recommended Posts

I'm using Spring with Hibernate and need to generate a Jasper report from some of the data in the beans so I fired up iReport and defined a Spring Loaded Hibernate Connection. My application connects to the database fine but I can't seem to get it hooked up to iReport. I have applicationContext.xml on the classpath and mysql-connector-java-<version>-bin.jar loaded as well yet no matter what I try I get a stack trace with

No suitable driver found for jdbc:mysql://127.0.0.1:3306/databasename

I know it's finding com.mysql.jdbc.Driver because when I change the name in hibernate.properties I get a different error. I copied the mysql-connector jar to the ext folder of my JDK as well. I also tried typing localhost instead of the ip and connecting to any and all databases I had locally. Nothing will get me connected. What can I do to diagnose/fix this problem? Thanks in advance.



Post Edited by robbr at 09/21/2009 11:38
Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

We're having the exact same problem as robbor. We are able to connect to our MYSQL database from iReport using a JDBC connection, however, the "Spring Loaded Hibernate Connection" is giving us nothing but grief. Here is the specific error we are getting...

 

Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://verto-beta:3306/spring_test      at java.sql.DriverManager.getConnection(Unknown Source)      at java.sql.DriverManager.getConnection(Unknown Source)      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174) 

 

We have tried importing numerous jar files (mysql connectors, etc..) and have even tried replacing the spring.jar and hibernate jar files in the iReport library folders. All to no avail...

 

We suspect that it is loading the library files in such a manner, where the mysql connector isn't being read by the spring framework. That being said, we have had no luck to date, and are now forced to abstract our .jrxml files so that we can pass in the data using a JRBeanCollectionDataSource.

 

If anyone knows how to fix this, your assistance would be appreciated.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...