Jump to content

peter.cliff

Members
  • Posts

    5
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by peter.cliff

  1. OK, so I think I've figured it partially out... Not very tidy but as this is a proof-of-concept I'll worry about tidy later... I unpacked the various jars as above, but in the end removed "cassandra-driver-core-2.1.3.jar" from the classpath and added it as a Maven dependency instead: <dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-core</artifactId> <version>2.1.3</version></dependency>[/code]The jar doesn't come with all the dependencies needed - I was getting a ClassNotFound for log4j. Thinking I might try v3 of the driver next... Then I create my own connection to Cassandra, manually execute the query and then pass the ResultSet to the CassandraDataSource. Finally pass that in to the report and I get data. Cluster cluster = Cluster.builder().addContactPoint("localhost").build();Session session = cluster.connect("my_lovely_keyspace");ResultSet rs = session.execute("SELECT * FROM table");CassandraDataSource ds = new CassandraDataSource(rs);JasperPrint jp = JasperFillManager.fillReport(PATH_TO_COMPILED_REPORT, params, ds);File reportfile = new File("./" + UUID.randomUUID().toString() + ".report.html");JasperExportManager.exportReportToHtmlFile(jp, reportfile.getAbsolutePath());String report = Files.toString(reportfile, Charset.defaultCharset());.[/code]Of course this only helps because I know the CQL for the report so suggestions for a better way welcome.
  2. OK, so adding the jars in the plugin above: cassandra-driver-core-2.1.3.jarjs-cassandracql3-datasource-2.3.jarmetrics-core-3.0.2.jarnetty-3.9.0.Final.jarjasperreports_extension.properties[/code]to the classpath changes the error to: There is no underlying connection. Please check your datasource[/code]Sounds like progress.Just need to work out how to sensibly create a CassandraDataSource perhaps?
  3. I've created a very simple example report that uses a Cassandra Data Adapter (com.jaspersoft.connectors.cassandra.adapter.CassandraDataAdapterImpl) and a simple dataset and query and use these to populate a crosstab. This works well using TIBCO JasperSoft Studio and the report previews with the data all there. I then created a very simple Java application using JasperSoft Library: JasperPrint jp = JasperFillManager.fillReport("PATH TO COMPILED REPORT TEMPLATE EXPORTED FROM STUDIO", params);File reportfile = new File("./" + UUID.randomUUID().toString() + ".report.html");JasperExportManager.exportReportToHtmlFile(jp, reportfile.getAbsolutePath());String report = Files.toString(reportfile, Charset.defaultCharset());[/code]but when I run this (as a Java application) I get: No query executer factory registered for the "CQL" language.[/code]Setting the data source to empty: JasperPrint jp = JasperFillManager.fillReport("PATH TO COMPILED REPORT TEMPLATE EXPORTED FROM STUDIO", params, new JREmptyDataSource());[/code]works, but of course the report is empty. I've tried taking the Cassandra plugin library from Studio (com.jaspersoft.studio.data.cassandra_6.3.1.final.jar) and adding to the classpath but that didn't help. I'm going to try pulling out the lib jars in there and add these directly too and see if I can create a CassandraDataSource. In the mean time does anyone have any ideas on where I'm going wrong and what I might need to do to fix this?
  4. Hello! Anyone know if / when Jasper Studio will support Apache Cassandra 3? Cassandra 2 is only supported to the end of November 2016! http://cassandra.apache.org/download/ Thanks! Peter
  5. I have the same problem. I suspect it is because I am using Cassandra 3 and it isn't supported.
×
×
  • Create New...