Jump to content
Changes to the Jaspersoft community edition download ×
  • This documentation is an older version of JasperReports Server Community Project Installation Guide. View the latest documentation.

    Database Privileges Required By JasperReports Server

    Install/upgrade process permissions:

    The JasperReports Server installation/upgrade processes and the repository database user need the following privileges to install and initialize the jasperserver repository database.

    Database Component Permissions Required

    databases

    CREATE

    DROP

    tables

    indexes

    constraints

    CREATE

    ALTER

    DROP

    data records

    INSERT

    UPDATE

    DELETE

    If you are upgrading in a restricted environment, your database administrator may need to give you temporary admin permissions for the upgrade. For example, if you are using PostgreSQL for your database, the database admin may use one of the following workarounds:

    Add administrator credentials in the default_master.properties file prior to upgrade and then replace them with jasperadmin credentials after upgrade.
    Prior to upgrade, grant CREATE and DROP permissions at the database server level for the jasperadmin user , then revoke those permissions after successful upgrade.

    Database Connectivity Errors

    The most common problems encountered with a new JasperReports Server instance are database configuration problems. The connection may fail because the application server can't find the driver for the data source. For example, in a default installation of JasperReports Server, Tomcat looks for data source drivers in <js‑install>/apache-tomcat/lib. If the driver's in a different location, put a copy of the driver in this directory and restart Tomcat.

    Testing the Database Connection

    The simplest database configuration problem is an incorrect user name or password. If you encounter database problems upon startup or login, check the user name and password by logging directly into your RDBMS as described below.

    You can connect to your database using the database configuration settings in JasperReports Server. This validates the database hostname, port, username, and password.

    If you're having trouble logging into JasperReports Server on the login page, check the existing users and passwords in the jasperserver.JIUser table.

    Logging into PostgreSQL

    Run the PostgreSQL client from the command line and try to connect to the database. For example:

    psql -U postgres jasperserver

    Logging into MySQL

    Run the MySQL client from the command line and try to log in directly as the root user, for example:

    <mysql>/bin/mysql -u root -p

    You're prompted for the password of the user you specified on the command line.

    Maximum Packet Size in MySQL

    If you're upgrading or importing into a MySQL database and your repository contains large objects like images, you may see an error like this:

    ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes

    The default max_allowed_packet on the MySQL server is 1M (one Megabyte = 1,048,576 bytes). The most effective fix is to change this value in the server configuration to accommodate the largest resource stored in your repository. The server configuration file is typically named my.cnf (or my.ini) and located in the MySQL root directory, but this may vary. Change the configuration setting to a larger value, for example:

    max_allowed_packet = 16M

    For more information, see http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html.

    After changing this value, restart the MySQL server. Then perform the upgrade or import step again.

    Connection reset by peer MySQL Error

    If you are using the MariaDB JDBC driver to connect to the MySQL database and get an error such as the following:

    Could not send query:Connection reset by peer: socket write error [/code]                        

    This message refers to the maximum packet size error described above. Follow those instructions.

    Case Sensitivity for Table and Column Names

    In some databases, table names are case-sensitive and “customer” and “Customer” are two different tables.

    If you're using a case-sensitive database for JasperReports Server, table names specified in query strings in the JRXML file of a saved report must match the table names used in the database. A mismatch when transferring data from one database to another may cause the capitalization of table names to change.

    In Windows MySQL, table and column names are not case-sensitive.

    In Linux MySQL, table and column names are case-sensitive. You can configure Linux MySQL to be non-case-sensitive by setting the configuration parameter lower_case_table_names to 1 in the my.ini or my.cnf file. For more information search the MySQL documentation for a section about identifier case sensitivity.

    Table and column names in PostgreSQL are case-sensitive.

    PostgreSQL: Job Scheduling Error

    If the Quartz settings in the PostgreSQL database aren't updated to specify the driver delegate class specific to PostgreSQL you'll get errors when you try and run a scheduled report.

    The errors will look like this:

    If you see this error, check your Quartz properties file in the following location:

    <tomcat>/webapps/jasperserver-ce/WEB-INF/js.quartz.properties

    Make sure the following property does not have the standard driver delegate, but instead has the PostgreSQL-specific driver delegate. It should look like the following for PostgreSQL:

    quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate

    Error Running a Scheduled Report

    If you run a scheduled report and save it as HTML or RTF, the resulting report may be quite large. If you are running MySQL and get the error shown here, the problem may be the default size of the MySQL blob datatype.

    JDBC exception on Hibernate data accessorg.hibernate.exception.GenericJDBCException: could not insert[/code]                    

    You can increase the size of this datatype by updating your my.ini or my.cnf MySQL configuration file with the following setting:

    max_allowed_packet=32M

    Error Running a Report

    If you can log into JasperReports Server but encounter an error when running a report, browse the repository to identify and resolve the problem.

    One common problem with an individual report is the data source. To validate a data source connection:

    1. Log into JasperReports Server as a user with administrative permissions and locate the report unit that returns errors.
    2. Select the report and click the Edit button in the toolbar and identify the data source on the fourth edit page.
    3. Edit the data source in the repository and check its settings.
    4. Click the Test Connection button.

    If the connection fails, perhaps the application server can't find the driver for the data source. For example, in a default installation of JasperReports Server, Tomcat looks for data source drivers in <js‑install>/apache-tomcat/lib.

    5. Test your report. If it still returns errors, edit the data source again and try checking other values, like the port used by the database.

    JDBC Driver Loading Error on Import/Export from WebLogic or WebSphere

    If you are using WebLogic or WebSphere and want to run import/export from the command line, you need to manually copy the JDBC driver to the same location as the import/export scripts. If you have not copied these files, you may encounter the following error:

    Cannot load JDBC driver class 'tibcosoftware.jdbc.sqlserver.SQLServerDriver'

    To fix this error, copy your database driver to the correct location:

    from:

    <js-install>buildomaticconf_sourcedb<your_database>jdbc

    or

    <js-install>buildomaticconf_sourcedb<your_database>native.jdbc

    to: <js-install>buildomaticconf_sourceieProlib

    Open topic with navigation


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...