Problem with MySQL driver (JasperReport Server 4.7.0)

1

Hi All,

I'm new with JasperReport, and had tried to search in the forums for MySQL driver issue, none of the solutions works.

I'm using:

  • JasperReport Server 4.7.0
  • PostgreSQL as repository database
  • MySQL server 5.1.44
  • iReport 4.8.0
  • Mac OS X

MySQL connection is working fine with iReport, but when I ported the report to JasperReport Server, I'm getting below error when running the report:

Error Message

com.jaspersoft.jasperserver.api.JSException: jsexception.error.creating.connection

Error Trace

com.jaspersoft.jasperserver.api.JSException: jsexception.error.creating.connection at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:63) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BaseJdbcDataSource.setReportParameterValues(BaseJdbcDataSource.java:49) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.setReportParameterValues(JdbcDataSourceService.java:68) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1463) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.sql.SQLException: No suitable driver found for jdbc.mysql://localhost:3306/ksj at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:185) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:55) ... 8 more

Error Message

java.sql.SQLException: No suitable driver found for jdbc.mysql://localhost:3306/ksj

Error Trace

java.sql.SQLException: No suitable driver found for jdbc.mysql://localhost:3306/ksj at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:185) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:55) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BaseJdbcDataSource.setReportParameterValues(BaseJdbcDataSource.java:49) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.setReportParameterValues(JdbcDataSourceService.java:68) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1463) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680)

 

I've copied mysql-connector-java-5.1.22-bin.jar to:

  • jasperreports-server-cp-4.7.0/apache-tomcat/lib
  • jasperreports-server-cp-4.7.0/buildomatic/conf_source/db/mysql/jdbc
  • jasperreports-server-cp-4.7.0/apache-tomcat/webapps/jasperserver/WEB-INF/lib

Below is the data source configuration at JasperReport:

  • Driver: com.mysql.jdbc.Driver
  • jdbc.mysql://localhost:3306/ksj

Kindly need your advise.

Thank you,

Ronny

 

ronnyrit's picture
Joined: Feb 13 2008 - 4:25pm
Last seen: 6 years 8 months ago
Did you figure this out? I have the same issue...
rhaag71 - 6 years 8 months ago
Unfortunately no... still having the same problem
ronnyrit - 6 years 8 months ago
Driver goes in this folder, as you tried before... jasperreports-server-cp-4.7.0/apache-tomcat/webapps/jasperserver/WEB-INF/lib The one step you did not list above is an important one.., restart Tomcat after you place the driver into the folder. I got it working just a bit ago. Also see this link... http://www.rhyous.com/2009/10/27/adding-a-sql-2008-server-as-a-datasourc... I basically just followed steps 1-4 on that page, I did not figure out how to enable the admin user for Tomcat though (so I can access Tomcat's 'manager' and restart it easily, I'll fix that later).. so I just restarted the computer, which restarted Tomcat, so I could get back to work quickly.
rhaag71 - 6 years 8 months ago
show 1 more...
Let me know if it works, I'll post it as an answer and you can mark it correct so others will have the benefit...
rhaag71 - 6 years 8 months ago

0 Answers:

No answers yet
Feedback
randomness