Coder Social home page Coder Social logo

amiablearul / elasticjasperserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wedjaaopen/elasticjasperserver

0.0 2.0 0.0 307 KB

Jaspersoft Server extension for ElasticJasper - the Jasper Reports ElasticSearch plugin.

License: Apache License 2.0

Java 100.00%

elasticjasperserver's Introduction

ElasticJasperServer

This piece of the puzzle allows Jaspersoft Server to receive from Jaspersoft Studio and execute reports that have ElasticSearch as datasource.

Compilation

To compile this software you will need:

  • Compile time JARs
    • jasperserver-api-metadata-5.6.x.jar
    • jasperreports-5.6.x.jar
  • ElasticJasper project open in your Eclipse workspace

You can get the first two JARs from the Jaspersoft Server deployment and clone and compile ElasticJasper by following the instructions there.

If you are lazy or Eclipse impaired you can use the pre-compiled libraries - es-adapter.jar, elasticparser-0.5.1-SNAPSHOT.jar and es-server-ds.jar - that you will find in this repository. Be aware that these binaries may not always be up to date.

Installation

The installation of the server component is not as straight forward as installing the plugin in the Jaspersoft Studio and requires a bit of care since you may break your working installation of Jaspersoft Server. This may not be a problem if you're setting one up just for this.

Before proceeding with the installation, make sure that you have a working installation of Jaspersoft Server: set it up, run it, try to run a couple of reports - check that it behaves correctly. If it stops working after installing this extension, at least you know what broke it.

JS_HOME indicates the path where the actual Jaspersoft Server has been installed. For example: if you deployed the server in a Tomcat application server that is installed in /opt/tomcat your JS_HOME is most probably going to be /opt/tomcat/webapps/jasperserver.

First of all stop the server. Then copy the adapter libraries - es-adapter.jar, elasticparser-0.5.1-SNAPSHOT.jar, and es-server-ds.jar - under JS_HOME/WEB-INF/lib

Then you need to remove the lucene libraries installed with Jaspersoft Server. This is because they are an old version and we need a newer one.

Copy the libraries needed by elasticsearch in JS_HOME/WEB-INF/lib. These libraries, it's not a coincidence, are the same ones you have bundled in the ElasticSearchOSGI:

  • elasticsearch-1.1.2.jar
  • lucene-analyzers-common-4.7.2.jar
  • lucene-codecs-4.7.2.jar
  • lucene-core-4.7.2.jar
  • lucene-grouping-4.7.2.jar
  • lucene-highlighter-4.7.2.jar
  • lucene-join-4.7.2.jar
  • lucene-memory-4.7.2.jar
  • lucene-misc-4.7.2.jar
  • lucene-queries-4.7.2.jar
  • lucene-queryparser-4.7.2.jar
  • lucene-sandbox-4.7.2.jar
  • lucene-spatial-4.7.2.jar
  • lucene-suggest-4.7.2.jar
  • spatial4j-0.4.1.jar

Copy the application configuration - applicationContext-es-datasource.xml - in JS_HOME/WEB-INF and es_datasource.properties in JS_HOME/WEB-INF/bundles

It's not time to do some editing.

Register the query language in the REST points configuration. Open JS_HOME/WEB-INF/applicationContext-rest-services.xml and find this bit:

<util:list id="queryLanguagesCe">
    <value>sql</value>
    <value>hql</value>
    <value>domain</value>
    <value>HiveQL</value>
    <value>MongoDbQuery</value>
    <value>cql</value>
</util:list>

and change it to:

<util:list id="queryLanguagesCe">
    <value>sql</value>
    <value>hql</value>
    <value>domain</value>
    <value>HiveQL</value>
    <value>MongoDbQuery</value>
    <value>elasticsearch</value>
    <value>cql</value>
</util:list>

Then it's time to edit JS_HOME/WEB-INF/classes/jasperreports.properties - add, at the very top of the file:

net.sf.jasperreports.query.executer.factory.elasticsearch=net.wedjaa.jasper.elasticsearch.query.ESQueryExecuterFactory

Now you can restart the server and test some ElasticSearch based reports.

Support

This software is released as is. We make no claim that it will do anything useful and it may potentially do harm to your self confidence. We will however keep an eye on the issues you open on GitHub and try an fix whatever it's broken.

We do offer professional services and support in case you need.

elasticjasperserver's People

Contributors

mrwho avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.