Jump to content

Exception raised by JRDataSource when running some sample code


Recommended Posts



I'm trying to compile and run a slightly modified sample code that came with jasperreports, namely the datasource one. 

The difference is the addition of a new class, so that the compilation, filling and exporting can be incorporated into another program, without having to run ant fill, ant compile and ant pdf etc. 

The error I'm getting says: Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JRDataSource

Even though I've included in my lib folder every .jar file found in jasperreports. (silly, but it still doesn't work)


And here's the code I've added to the datasource sample (after deleting DataSourceApp.java, of course):


Any idea would be appreciated. Thanks!

LE: the original datasource sample code compiles and runs perfectly.


Post Edited by expireddreams at 03/24/2012 13:18

Post Edited by expireddreams at 03/24/2012 13:52
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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