Jasper Server could not insert error

In Jasper Server, you may encounter the following error:

org.hibernate.exception.GenericJDBCException: could not insert: [com.jaspersoft lipitor 10mg.jasperserver.api.metadata.common.service.impl.hibernate.persistent.ContentRepoFileResource]

This can be caused by having too many automated reports stored in your Content Files directory. Especially if there are number of large .xls (or any type of file).

Just be sure to keep this directory to less than 50 files, and you should be good!

Jasper Server Permission Denied error

Occasionally, Jasper Server has an error relating to being unable to write files. The errors show up in the Apache web server log, catalina.out.

You have probably started the service as the user root on accident. This will cause ownership to change to root on some log files. Then when you log back on as user jasper and restart your server, the Apache logs are filling with messages about not being able to write files. Jasper is just not working properly. Run the following command to restore the proper ownership to all files in the Jasper directory. You must run the following command as root:

>find /home/jasper/jasper-server-3.7 -user root -exec chown jasper.jasper {} \;

This will find all the files that root changed ownership and change the ownership back to the proper jasper user.

Restoring all reports to Jasper Server

Sometimes it is necessary to restore an entire copy of Jasper Reports generic lipitor. This can only be done by first removing all of the existing entries in the Jasper Reports server to be restored to.

First, on the source machine, backup the entire Jasper Reports server by running the following commands:

> cd /home/jasper/jasperserver-3.5/scripts
> /home/jasper/jasperserver-pro-3.5/scripts/js-export.sh –everything –output-dir /home/jasper/jasperserver-pro-3.5/scripts/js-export.$HOSTNAME.`date +\%y\%m\%d`

Then copy the backup directory to the destination machine:

> scp -pr /home/jasper/jasperserver-pro-3.5/scripts/js-export.$HOSTNAME.`date +\%y\%m\%d` destinationMachine:/home/jasper/jasperserver-pro-3.5/scripts

Now, on the destination Jasper Server, run the following commands:

> cd ~/jasperserver-3.5/scripts/mysql
> ./jasper_init.sh
> cd ..

Finally, do the restore by running the following command:

> ./js-import.sh –input-dir js-export.<TheHostNameOfTheSourceMachine>.`date +\%y\%m\%d`

Now just be sure to update your Data Sources in the Jasper web site on the destination machine.

Jasper Server timezone issue

In Jasper Server 2.x and greater, there is an issue where reports will appear to off by one day. This is most likely a timezone configuration issue with your datasource.

To avoid this problem, when you configure a data source, be sure to leave the time zone information blank. That’s right, don’t select your local timezone. Just leave it blank. Apparently, this means that you don’t want to any timezone checking. Which is actually correct.