Jump to content
Changes to the Jaspersoft community edition download ×

Connect to mySQL

2005 IR Help

Recommended Posts

By: Romy Yuliawan - snricek

Connect to mySQL

2001-11-28 01:28


I've compiled sample file FirstJasper.xml.

I used mySQL database, and I've changed JDBC driver on JasperReportsTestApp.


String driver = "com.caucho.jdbc.mysql.Driver"; 
String connectString = "jdbc:mysql-caucho://";


When I run the taskFill.bat file, an error raised..


C:JRmysql>C:JDK1.3binjava.exe -classpath ./;C:common-libjasperreports.jar;
common-libiText.jar;C:common-libcaucho-jdbc-mysql-0.2.7.jar -Dorg.xml.sax.dr
iver=org.apache.xerces.parsers.SAXParser JasperReportsTestApp -Tfill -FFirstJasp
Exception in thread "main" java.lang.NoClassDefFoundError: com/caucho/vfs/LogStr
at com.caucho.jdbc.mysql.Driver.<clinit>(Driver.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at JasperReportsTestApp.getConnection(JasperReportsTestApp.java:118)
at JasperReportsTestApp.main(JasperReportsTestApp.java:60)



I have include "caucho-jdbc-mysql-0.2.7.jar"




By: Teodor Danciu - teodord

RE: Connect to mySQL

2001-11-28 23:12




This error is related to your JDBC driver.

It seems that it needs also another library

since it doesn't find that class:


Maybe you should check if there is another

JAR file that you should have in the CLASSPATH

along with the caucho-jdbc-mysql-0.2.7.jar.


But I have a question for you:

My sample uses the table Orders from the

Northwind sample database that comes with

Microsoft SQL Server.

Are you sure that on your mySQL server there

is a similar Northwind database?

Have you imported it from MS SQL Server?

If not, I will be not surprise if the sample

application wouldn't work.


For the moment, I don't have a sample specially

designed for some mySQL default database.

But I'm thinking of it.


Good luck!





By: Romy Yuliawan - snricek

RE: Connect to mySQL

2001-11-30 01:50

What should I do to set the classpath ?

if my file configuration look like this:


Java :
Jasper Engine:
Jasper Application:


I have imported Northwind from SQL server into mySQL, but only Orders table ;)




Post edited by: tcloonan, at: 2006/08/12 18:16

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...