grailsjasper-reportsjasper-plugin

Grails Jasper Reports: table not found issue


I wish to use Jasper Reports to generate some files filled with data from a MySQL DB. So far I've created a simple report with a couple of fields. It uses a jdbc:mysql datasource. I used Jaspersoft Studio for that and the report works there as it should.

The problem is that when I try to generate a report with grails jasper plugin I get the following exception:

| Error 2013-03-26 17:01:04,892 [http-bio-8080-exec-4] ERROR errors.GrailsExceptionResolver  - JdbcSQLException occurred when processing request: [GET] /testJasper/jasper/ - parameters:
_format: PDF
_name: print test
_file: testHH
Table "RESUME" not found
Table "RESUME" not found; SQL statement:
select * from resume [42102-164]. Stacktrace follows:
Message: Table "RESUME" not found
Table "RESUME" not found; SQL statement:
select * from resume [42102-164]

This is what I get on the app page:

Error 500: Internal Server Error
URI:
/testJasper/jasper/
Class:
org.h2.jdbc.JdbcSQLException
Message:
Table "RESUME" not found. Table "RESUME" not found; SQL statement: select * from resume [42102-164]

Looks like there is something wrong with the datasource in the plugin. Why is this org.h2.jdbc used? What do I need to configure in order to run the report from my grails app?


Solution

  • Check your datasource configuration and the value of the dbCreate property. http://grails.org/doc/latest/guide/conf.html#dataSource