Jaspersoft Cassandra JasperReports Server

Configuring JasperReports Server with the Cassandra Connector

Summary

  1. Deploy the connector
  2. Define a connection
  3. Deploy reports

Details

  1. Deploy the connector

    Download the Cassandra Connector. Unzip it. Copy the files in WEB-INF into your JasperReports Server instance. Be sure to keep the folder structure when copying the files. In connector version 0.5.1 these are the files:

    WEB-INF/applicationContext-CassandraDataSource.xml
    WEB-INF/bundles/CassandraDataSource.properties
    WEB-INF/lib/cassandra-clientutil-1.0.9.jar
    WEB-INF/lib/cassandra-jdbc-1.0.5-SNAPSHOT.jar
    WEB-INF/lib/cassandra-thrift-1.0.9.jar
    WEB-INF/lib/guava-r08.jar
    WEB-INF/lib/js-cassandra-datasource-0.5.1.jar
    WEB-INF/lib/json-org-1.0.jar
    WEB-INF/lib/libthrift-0.6.1.jar
    ** The json-org-1.0.jar file was not in the zip file. I had to download it from the web to get things to work. **

    Special fix: remove the Hive libraries which ship with JasperReports Server since these conflict with Cassandra (clashing Thrift versions). Here are the scripted changes for a Linux instance, but you can just delete (or rename) the files manually:

    mv WEB-INF/lib/hive-common-0.8.1.jar       WEB-INF/lib/hive-common-0.8.1.ja_
    mv WEB-INF/lib/hive-exec-0.8.1.jar         WEB-INF/lib/hive-exec-0.8.1.ja_
    mv WEB-INF/lib/hive-jdbc-0.8.1.jar         WEB-INF/lib/hive-jdbc-0.8.1.ja_
    mv WEB-INF/lib/hive-metastore-0.8.1.jar    WEB-INF/lib/hive-metastore-0.8.1.ja_
    mv WEB-INF/lib/hive-service-0.8.1.jar      WEB-INF/lib/hive-service-0.8.1.ja_

    Restart JasperReports Server.

  2. Define a connection

    Right-click on a folder in the Repository View in JasperReports Server. Use the context menu to add a data source. The data source definion should follow the model shown below.

    Cassandra Data Source

  3. Deploy reports

    Use either the JasperReports Server web interface or iReport to deploy the report to JasperReports Server.

Feedback
randomness