Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: calling Pentaho Report from java

  1. #1
    Join Date
    Dec 2015
    Posts
    14

    Default calling Pentaho Report from java

    Hi,

    I try to embedd a Pentaho Report into my Java Application.

    see:

    http://infocenter.pentaho.com/help/i...ng_engine.html

    but this does not work for Sample1.Java since it cannot perform the select to customers table

    Exception in thread "main" org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query: SELECT
    "CUSTOMERS"."CUSTOMERNAME"
    FROM
    "CUSTOMERS"
    ORDER BY
    "CUSTOMERS"."CUSTOMERNAME" ASC
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:183)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:139)
    at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStaticInternal(CompoundDataFactory.java:171)
    at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryStatic(CompoundDataFactory.java:153)
    at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:64)
    at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryInternal(CachingDataFactory.java:419)
    at org.pentaho.reporting.engine.classic.core.cache.CachingDataFactory.queryData(CachingDataFactory.java:302)
    at org.pentaho.reporting.engine.classic.core.parameters.DefaultListParameter.getValues(DefaultListParameter.java:97)
    at org.pentaho.reporting.engine.classic.core.parameters.DefaultReportParameterValidator.computeValidListValue(DefaultReportParameterValidator.java:280)
    at org.pentaho.reporting.engine.classic.core.parameters.DefaultReportParameterValidator.validateSingleParameter(DefaultReportParameterValidator.java:234)
    at org.pentaho.reporting.engine.classic.core.parameters.DefaultReportParameterValidator.validate(DefaultReportParameterValidator.java:133)
    at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.initializeForMasterReport(ProcessState.java:233)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:418)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1424)
    at source.org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:219)
    at source.org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:128)
    at source.org.pentaho.reporting.engine.classic.samples.Sample1.main(Sample1.java:121)
    Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CUSTOMERS
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
    at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.parametrizeAndQuery(SimpleSQLReportDataFactory.java:308)
    at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:178)
    ... 16 more
    Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: CUSTOMERS
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.SchemaManager.getTable(Unknown Source)
    at org.hsqldb.ParserDQL.readTableName(Unknown Source)
    at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source)
    at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source)
    at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source)
    at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)
    at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)
    at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
    at org.hsqldb.ParserCommand.compilePart(Unknown Source)
    at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
    at org.hsqldb.Session.executeDirectStatement(Unknown Source)
    at org.hsqldb.Session.execute(Unknown Source)
    ... 20 more

    Thanks
    Norbert

  2. #2
    lyarbrough Guest

    Default

    Will Gorman wrote a book all about this. You can buy it on Amazon. it's a little old but I think you will find it useful.

  3. #3
    Join Date
    Mar 2017
    Posts
    2

    Default

    I m facing the same problem. Can someone sort this problem out.
    @staiger - Did you get the solution?

  4. #4
    Join Date
    Feb 2014
    Posts
    3

    Default

    I've stumbled upon the same issue.
    Have you guys solved it?

  5. #5
    Join Date
    Feb 2014
    Posts
    3

    Default

    The sampledata.script file from PRE 7.0 does the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.