Giter VIP home page Giter VIP logo

pentaho-reporting's Introduction

Pentaho Reporting

Pentaho Reporting is Java class library for generating reports. It provides flexible reporting and printing functionality using data from multiple sources and supports output to display devices, printers, PDF, Excel, XHTML, PlainText, XML and CSV files.

The Pentaho Report Designer provides a graphical editor for report definitions and can also be used as standalone desktop reporting tool.

The library is optimized for performance and a small memory footprint and can run completely in memory without generating temporary files or requiring extra compilation steps. Pentaho Reporting gives the user a great degree of flexibility while designing reports.

This software is free and opensource software available under the terms of the GNU Lesser General Public License (LGPL) Version 2.1.

For an up to date list of changes in the releases of Pentaho Reporting, please visit the JIRA system at http://jira.pentaho.com/browse/PRD There you will find all releases along with the issues fixed for each release.

Pre-requisites for building the project:

  • Maven, version 3+
  • Java JDK 11
  • This settings.xml in your /.m2 directory

Building it

Build for nightly/release

All required profiles for the "with-osgi" or standard build are activated by the presence of a property named "release".

$ mvn clean install -Drelease

This will build, unit test, and package the whole project (all of the sub-modules). The artifact will be generated in: assemblies/prd-ce/target

Build witn no-osgi

All required profiles for the smaller "no-osgi" build are activated by the presence of two properties named "no-osgi" and "release".

$ mvn clean install -Dno-osgi -Drelease

This will build, unit test, and package the whole project (all of the sub-modules). The artifact will be generated in: assemblies/prd-ce/target

Build for CI/dev

The release builds will compile the source for production (meaning potential obfuscation and/or uglification). To build without that happening, just eliminate the release property.

$ mvn clean install

Running the tests

Unit tests

This will run all unit tests in the project (and sub-modules). To run integration tests as well, see Integration Tests below.

$ mvn test

If you want to remote debug a single java unit test (default port is 5005):

$ cd core
$ mvn test -Dtest=<<YourTest>> -Dmaven.surefire.debug

Integration tests In addition to the unit tests, there are integration tests in the core project.

$ mvn verify -DrunITs

To run a single integration test:

$ mvn verify -DrunITs -Dit.test=<<YourIT>>

To run a single integration test in debug mode (for remote debugging in an IDE) on the default port of 5005:

$ mvn verify -DrunITs -Dit.test=<<YourIT>> -Dmaven.failsafe.debug

Performance and "Golden" tests

If you feel paranoid you can also run performance tests. Expect to wait an hour while all tests run.

$ mvn test -Dtest.long=true -Dtest.performance=true

If you get OutOfMemoryErrors pointing to a JUnitTask, or if you get OutOfMemory “PermGen Space” errors, increase the memory of your Ant process to 1024m by setting the MAVEN_OPTS environment variable:

$ export MAVEN_OPTS="-Xmx1024m"

IntelliJ

  • Don't use IntelliJ's built-in maven. Make it use the same one you use from the commandline.
    • Project Preferences -> Build, Execution, Deployment -> Build Tools -> Maven ==> Maven home directory

Available Distributions

Pentaho Reporting is a modular system and depending on the feature set you use, you may need a different set of applications or libraries.

Web-Based Reporting

If you intend to make reports available over the internet, we recommend to use the Pentaho BI-Server/BI-Platform to host your reports. The Pentaho BI-Platform is a J2EE-Web-Application that provides all services to run and manage reports in a Web-2.0 environment.

Standalone Reporting

The Pentaho Report-Designer can be used as a desktop reporting environment. The designer allows you to create and run reports manually and to create all supported document types (PDF, HTML, Text, RTF, Excel and CSV-files).

Embedded Reporting

The Pentaho Reporting Engine consists of a set of base libraries, the reporting engine core and several extension modules, which provide additional datasources as well as charting and barcode capabilities.

The Pentaho Reporting Engine ships with a Swing Print Preview dialog, which can be easily embedded into an existing Java/Swing application. The dialog offers access to all supported export file formats.

We created a SDK with four simple code examples and documents that walk you through the code to get you started more easily.

System Requirements

Pentaho Reporting requires a minimum of 192MB of allocated heap-space to process reports. Reports with more than 400 pages or about 50.000 rows of data may require additional memory and/or adjustments to the global configuration parameters of the reporting engine.

The Pentaho Reporting Engine requires Java 11 or higher. The Pentaho Report Designer and Pentaho Report Design Wizard also need at least Java 11 or higher.

Warning:
Pentaho Reporting requires a Java Runtime environment that is fully
compatible to the Java Platform Specification 8.0 (JSR-337). It will
not run with the GNU GCJ suite of tools.

Installation

A. Windows

Download the ZIP distribution.

The Pentaho Report Designer can be extracted into any directory. We recommend that you place the report-designer into "C:\Program Files\report-designer" (or an equivalent) directory.

Start the application by executing (or double-clicking) either the "report-designer.bat" file or the launcher.jar file.

B. Linux/Solaris/Unix

Download either the ZIP or the TAR.GZ distribution.

The Pentaho Report Designer can be extracted into any directory. We recommend that you place the report-designer into "/opt/report-designer" (or an equivalent) directory.

Start the application by executing either

 cd /opt/report-designer
 ./report-designer.sh

or

 java -jar /opt/report-designer/launcher.jar

C. MacOS

Download either the ZIP or the TAR.GZ distribution.

The Pentaho Report Designer can be extracted into any directory.

Start the application by double clicking on the

 report-designer.command file

or

 executing './report-designer.sh' in a terminal window

Documentation

The Javadoc HTML pages for the latest release of Pentaho Reporting are available at

http://javadoc.pentaho.com/reporting/

You can also regenerate the Javadocs directly from the source code. There is a task "javadoc" in the Ant script (see below) that makes this relatively simple.

The reporting engine and thus most of the features of the report designer are well documented in Will Gorman's excellent book "Pentaho Reporting 3.5 for Java Developers".

https://www.packtpub.com/pentaho-reporting-3-5-for-java-developers/book

Technical articles and general documentation can be found in our Wiki.

https://pentaho-community.atlassian.net/wiki/display/Reporting/

If you intend to embed Pentaho Reporting in your own applications, the SDK contains a thorough step-by-step guide to the enclosed examples.

Code organization

Our code is split into three groups of modules.

  • “/libraries” contains all shared libraries and code that provides infrastructure that is not necessarily reporting related.
  • “/engine” contains the runtime code for Pentaho Reporting. If you want to embed our reporting engine into your own Swing application or whether you want to deploy it as part of a J2EE application, this contains all your ever need.
  • “/designer” contains our design-time tools, like the report-designer and the report-design-wizard. It also contains all data source UIs that are used in both the Report Designer and Pentaho Report Wizard.

At Pentaho we use Scrum as our development process. We end up working on a set of features for about 3 weeks, called a Sprint. All work for that Sprint goes into a feature branch (sprint_XXX-4.0.0GA) and gets merged with the master at the end of the sprint.

If you want to keep an eye on our work while we are sprinting, check out the sprint branches. If you prefer is more stable, and are happy with updates every three weeks, stick to the master-branch.

Reporting Bugs

Free support is available via the Pentaho Reporting forum.

https://community.hitachivantara.com/s/topic/0TO1J0000017kVRWAY/reporting-analytics/

Please note that questions are answered by volunteers, so there is no guaranteed response time or level of service.

Please avoid e-mailing the developers directly for support questions. If you post a message in the forum, then everyone can see the question, and everyone can see the answer.

If you found a bug, please either discuss it in the forum or report it in our JIRA system. You will need to create a JIRA login before reporting the bug. Access to our JIRA system is free for everyone.

http://jira.pentaho.com/

Commercial Support

Pentaho offers commercial support for Pentaho Reporting with guaranteed response times. Please see

http://www.pentaho.com/products/reporting/

for more details.

pentaho-reporting's People

Contributors

andreramos89 avatar annapopova1 avatar denisprotopopov avatar e-cuellar avatar krishnaalluhitachi avatar lgrill-pentaho avatar lucboudreau avatar mdamour1976 avatar mkambol avatar nantunes avatar pamval avatar pedrofvteixeira avatar pentaho-nbaker avatar pentaho-skarmali avatar pentaho-tband avatar peterrinehart avatar ppatricio avatar prakapenka avatar renato-s avatar ricardosilva88 avatar ricksjames avatar rmansoor avatar sailingscally avatar smaring avatar smmribeiro avatar ssamora avatar stanislau-strelchanka avatar tkafalas avatar tmorgner avatar yuryby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pentaho-reporting's Issues

What's new/changed from version to version

We would like to update from v8 to v9, but we can't find anything about changes.

So what are the (possible) breaking changes and other new features that we should take into account, while migrating?

Also couldn't find it on the Jira page.

Fix Maven repo build error

As indicated in the readme:

"If you intend to use Maven to use Pentaho Reporting, be aware that Maven does not resolve correctly against Pentaho's repository. The Pentaho build process produces invalid snapshot builds."

Hence those of us using Maven can't make use of Maven management, which is a serious disadvantage. Are there any plans to address this? It's not really feasible to have to maintain a local up to date build of Pentaho in a local Maven repo as suggested.

I'm kinda surprised this has been left like this. Doesn't make sense given the massive Maven deployment that seems to be in place.

Puzzled.

There are no chart images

Hi there,

we try to use the pentaho reporting SDK within a spring boot application.

build.gradle:

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.5'
    id 'io.spring.dependency-management' version '1.1.4'
}
...
java {
    sourceCompatibility = '21'
}

repositories {
    mavenCentral()
    maven { url 'https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/'  }
}

ext {
    pentahoReportingVersion = '9.4.0.0-343'
    postgresqlVersion = '42.7.1'
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-freemarker'
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'

    runtimeOnly group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"

    implementation group: 'org.pentaho.reporting.engine', name: 'classic-core', version: "${pentahoReportingVersion}"
    implementation group: 'org.pentaho.reporting.engine', name: 'classic-extensions', version: "${pentahoReportingVersion}"
    implementation group: 'org.pentaho.reporting.engine', name: 'legacy-charts', version: "${pentahoReportingVersion}"

    implementation group: 'org.jfree', name: 'jfreechart', version: '1.0.19'
...

ReportingService.java:

        ClassicEngineBoot.getInstance().start();

        final ResourceManager resourceManager = new ResourceManager();
        resourceManager.registerDefaults();

        final var baos = new ByteArrayOutputStream();

        try
        {
            Resource res = resourceManager.createDirectly(
                            resourceLoader.getResource(REPORTING_FILE_PATH).getURI().toURL(), MasterReport.class);
            final MasterReport masterReport = (MasterReport)res.getResource();
            queryParams = Map.ofEntries(....);

            addParametersToReport(masterReport, queryParams);

            HtmlReportUtil.createStreamHTML(masterReport, baos);

With this our report is generated but there are no chart images shown. What could be the problem here?
In the report designer the charts show up.

Thanks for help!
Karsten

Dependency org.apache.httpcomponents:httpclient, leading to CVE problem

Hi, In /designer/report-designer-extension-pentaho,there is a dependency org.apache.httpcomponents:httpclient:4.5.9 that calls the risk method.

CVE-2020-13956

The scope of this CVE affected version is [,4.5.13)

After further analysis, in this project, the main Api called is org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 5

org.pentaho.reporting.designer.core.versionchecker.VersionCheckerUtility$VersionCheckerRunnable: run()V /.m2/repository/org/pentaho/commons-xul-swing/9.4.0.0-SNAPSHOT/commons-xul-swing-9.4.0.0-SNAPSHOT.jar
org.pentaho.versionchecker.VersionChecker: performCheck(boolean)V  /.m2/repository/org/pentaho/commons-xul-swing/9.4.0.0-SNAPSHOT/commons-xul-swing-9.4.0.0-SNAPSHOT.jar
org.apache.http.impl.client.DecompressingHttpClient: execute(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.HttpResponse; /.m2/repository/org/pentaho/commons-xul-swing/9.4.0.0-SNAPSHOT/commons-xul-swing-9.4.0.0-SNAPSHOT.jar
org.apache.http.impl.client.DecompressingHttpClient: getHttpHost(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.HttpHost; /.m2/repository/org/pentaho/commons-xul-swing/9.4.0.0-SNAPSHOT/commons-xul-swing-9.4.0.0-SNAPSHOT.jar
org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost;

cd
Dependency tree--

[INFO] org.pentaho.reporting.designer:ext-pentaho:jar:9.4.0.0-SNAPSHOT
[INFO] +- org.pentaho.reporting.designer:report-designer:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:configuration-editor:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libformula-ui:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libswing:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.engine:classic-core:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.engine:classic-extensions:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- org.pentaho.reporting.library:libsparkline:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- barbecue:barbecue:jar:1.5-beta1:compile
[INFO] |  |  +- net.sf.barcode4j:barcode4j:jar:2.0:compile
[INFO] |  |  +- avalon-framework:avalon-framework:jar:4.1.5:compile
[INFO] |  |  +- commons-pool:commons-pool:jar:1.5.7:compile
[INFO] |  |  +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  |  \- com.sun.mail:javax.mail:jar:1.6.1:compile
[INFO] |  +- org.pentaho.reporting.engine:classic-extensions-scripting:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.engine:classic-extensions-reportdesigner-parser:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- org.pentaho.reporting.engine:classic-extensions-xpath:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- org.pentaho.reporting.engine:classic-extensions-mondrian:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  +- pentaho:mondrian:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  |  +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  |  |  |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  |  |  |  +- org.apache.logging.log4j:log4j-core:jar:2.17.1:compile
[INFO] |  |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.17.1:compile
[INFO] |  |  |  |  +- commons-math:commons-math:jar:1.1:compile
[INFO] |  |  |  |  +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] |  |  |  |  +- eigenbase:eigenbase-properties:jar:1.1.2:compile
[INFO] |  |  |  |  +- eigenbase:eigenbase-resgen:jar:1.3.1:compile
[INFO] |  |  |  |  +- org.olap4j:olap4j:jar:1.2.0:compile
[INFO] |  |  |  |  +- org.olap4j:olap4j-xmla:jar:1.2.0:compile
[INFO] |  |  |  |  +- xerces:xercesImpl:jar:2.12.0:compile
[INFO] |  |  |  |  +- javacup:javacup:jar:10k:compile
[INFO] |  |  |  |  \- net.java.dev.javacc:javacc:jar:5.0:compile
[INFO] |  |  |  +- eigenbase:eigenbase-xom:jar:1.3.5:compile
[INFO] |  |  |  \- commons-io:commons-io:jar:2.11.0:compile
[INFO] |  |  +- org.pentaho.reporting.engine:classic-extensions-pmd:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  +- org.pentaho:pentaho-metadata:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  |  +- joda-time:joda-time:jar:2.10.2:compile
[INFO] |  |  |  |  +- com.thoughtworks.xstream:xstream:jar:1.4.17:compile
[INFO] |  |  |  |  |  \- io.github.x-stream:mxparser:jar:1.2.1:compile
[INFO] |  |  |  |  |     \- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] |  |  |  |  +- org.netbeans:jmi:jar:200507110943:compile
[INFO] |  |  |  |  +- org.netbeans:mdrapi:jar:200507110943:compile
[INFO] |  |  |  |  +- org.netbeans:mof:jar:200507110943:compile
[INFO] |  |  |  |  +- org.netbeans:nbmdr:jar:200507110943-custom:compile
[INFO] |  |  |  |  +- pentaho:pentaho-connections:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  |  +- pentaho-kettle:kettle-core:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  |  |  +- jug-lgpl:jug-lgpl:jar:2.0.0:compile
[INFO] |  |  |  |  |  +- com.jcraft:jzlib:jar:1.0.7:compile
[INFO] |  |  |  |  |  +- ognl:ognl:jar:2.6.9:compile
[INFO] |  |  |  |  |  +- net.sf.scannotation:scannotation:jar:1.0.2:compile
[INFO] |  |  |  |  |  +- com.wcohen:com.wcohen.secondstring:jar:0.1:compile
[INFO] |  |  |  |  |  +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] |  |  |  |  |  +- org.samba.jcifs:jcifs:jar:1.3.3:compile
[INFO] |  |  |  |  |  +- org.springframework:spring-expression:jar:5.3.3:compile
[INFO] |  |  |  |  |  |  \- org.springframework:spring-core:jar:5.3.3:compile
[INFO] |  |  |  |  |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.27:compile
[INFO] |  |  |  |  |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.27:compile
[INFO] |  |  |  |  |  \- org.pentaho:pentaho-encryption-support:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |  |  \- pentaho:pentaho-cwm:jar:1.5.4:compile
[INFO] |  |  |  |     +- org.netbeans:jmiutils:jar:200507110943:compile
[INFO] |  |  |  |     \- org.netbeans:openide-util:jar:200507110943:compile
[INFO] |  |  |  \- pentaho-kettle:kettle-engine:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |     +- org.pentaho:pdi-engine-api:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |     |  +- javax.websocket:javax.websocket-api:jar:1.0:compile
[INFO] |  |  |     |  \- org.reactivestreams:reactive-streams:jar:1.0.0:compile
[INFO] |  |  |     +- org.pentaho:pentaho-registry:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |     +- pentaho:metastore:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  |     +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] |  |  |     +- org.owasp.encoder:encoder:jar:1.2:compile
[INFO] |  |  |     +- commons-validator:commons-validator:jar:1.3.1:compile
[INFO] |  |  |     +- com.enterprisedt:edtftpj:jar:2.1.0:compile
[INFO] |  |  |     +- com.googlecode.jsendnsca:jsendnsca:jar:2.0.1:compile
[INFO] |  |  |     +- feed4j:feed4j:jar:1.0:compile
[INFO] |  |  |     +- ftp4che:ftp4che:jar:0.7.1:compile
[INFO] |  |  |     +- georss-rome:georss-rome:jar:0.9.8:compile
[INFO] |  |  |     +- org.ini4j:ini4j:jar:0.5.1:compile
[INFO] |  |  |     +- org.codehaus.janino:commons-compiler:jar:3.0.8:compile
[INFO] |  |  |     +- org.codehaus.janino:janino:jar:3.0.8:compile
[INFO] |  |  |     +- javadbf:javadbf:jar:20081125:compile
[INFO] |  |  |     +- com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] |  |  |     +- jsonpath:jsonpath:jar:1.0:compile
[INFO] |  |  |     +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:compile
[INFO] |  |  |     +- com.sun.jersey:jersey-bundle:jar:1.19.1:compile
[INFO] |  |  |     +- jexcelapi:jxl:jar:2.6.12:compile
[INFO] |  |  |     +- ldapjdk:ldapjdk:jar:20000524:compile
[INFO] |  |  |     +- org.odftoolkit:odfdom-java:jar:0.8.6:compile
[INFO] |  |  |     +- org.postgresql:postgresql:jar:42.2.23:compile
[INFO] |  |  |     +- rome:rome:jar:1.0:compile
[INFO] |  |  |     +- org.eobjects.sassyreader:SassyReader:jar:0.5:compile
[INFO] |  |  |     +- net.sf.saxon:saxon:jar:9.1.0.8:compile
[INFO] |  |  |     +- net.sf.saxon:saxon-dom:jar:9.1.0.8:compile
[INFO] |  |  |     +- org.yaml:snakeyaml:jar:1.7:compile
[INFO] |  |  |     +- org.snmp4j:snmp4j:jar:1.9.3d:compile
[INFO] |  |  |     +- org.syslog4j:syslog4j:jar:0.9.46:compile
[INFO] |  |  |     +- trilead-ssh2:trilead-ssh2:jar:build213:compile
[INFO] |  |  |     +- javax.xml:jaxrpc-api:jar:1.1:compile
[INFO] |  |  |     +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] |  |  |     +- wsdl4j:wsdl4j-qname:jar:1.6.1:compile
[INFO] |  |  |     +- com.fasterxml.jackson.core:jackson-core:jar:2.9.10:compile
[INFO] |  |  |     +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.10:compile
[INFO] |  |  |     +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.10.2:compile
[INFO] |  |  |     +- org.hibernate:hibernate-core:jar:3.6.9.Final:compile
[INFO] |  |  |     +- org.hibernate:hibernate-c3p0:jar:3.6.9.Final:compile
[INFO] |  |  |     +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] |  |  |     +- org.hibernate:hibernate-ehcache:jar:3.6.9.Final:compile
[INFO] |  |  |     +- cglib:cglib-nodep:jar:2.2:compile
[INFO] |  |  |     +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile
[INFO] |  |  |     +- org.mnode.mstor:mstor:jar:0.9.13:compile
[INFO] |  |  |     +- org.xerial.snappy:snappy-java:jar:1.1.0:compile
[INFO] |  |  |     +- commons-cli:commons-cli:jar:1.2:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-jaas:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-server:jar:9.4.18.v20190429:compile
[INFO] |  |  |     |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  |     |  +- org.eclipse.jetty:jetty-http:jar:9.4.18.v20190429:compile
[INFO] |  |  |     |  \- org.eclipse.jetty:jetty-io:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-security:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-servlet:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-util:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-xml:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- org.eclipse.jetty:jetty-webapp:jar:9.4.18.v20190429:compile
[INFO] |  |  |     +- com.googlecode.log4jdbc:log4jdbc:jar:1.2:compile
[INFO] |  |  |     +- com.cronutils:cron-utils:jar:9.1.6:compile
[INFO] |  |  |     |  \- org.glassfish:javax.el:jar:3.0.0:compile
[INFO] |  |  |     +- com.sun.xml.bind:jaxb-impl:jar:2.3.3:runtime
[INFO] |  |  |     \- io.reactivex.rxjava2:rxjava:jar:2.2.3:compile
[INFO] |  |  \- org.pentaho.reporting.engine:legacy-charts:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |     +- jfree:jfreechart:jar:1.0.13:compile
[INFO] |  |     \- jfree:jcommon:jar:1.0.16:compile
[INFO] |  +- org.pentaho.reporting.engine:classic-extensions-drill-down:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- pentaho:pentaho-versionchecker:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  \- org.safehaus.jug:jug-lgpl:jar:2.0.0:compile
[INFO] |  +- org.pentaho:commons-xul-swing:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  \- org.pentaho:commons-xul-core:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.fife.ui:rsyntaxtextarea:jar:1.3.2:compile
[INFO] |  +- org.swinglabs:swingx:jar:1.6.1:compile
[INFO] |  |  +- com.jhlabs:filters:jar:2.0.235:compile
[INFO] |  |  \- org.swinglabs:swing-worker:jar:1.1:compile
[INFO] |  +- com.typesafe.akka:akka-actor_2.10:jar:2.3.3:compile
[INFO] |  |  +- org.scala-lang:scala-library:jar:2.10.4:compile
[INFO] |  |  \- com.typesafe:config:jar:1.2.1:compile
[INFO] |  +- com.google.guava:guava:jar:17.0:compile
[INFO] |  \- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] +- org.pentaho.reporting.library:libpensol:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libbase:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.apache.commons:commons-vfs2:jar:2.7.0:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- pentaho:pentaho-platform-repository:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- pentaho:pentaho-platform-extensions:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- pentaho:pentaho-platform-core:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- pentaho:pentaho-platform-api:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  +- org.jvnet.mimepull:mimepull:jar:1.9.3:compile
[INFO] |  +- com.sun.jersey.contribs:jersey-multipart:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey.contribs:jersey-apache-client:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey:jersey-core:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey:jersey-json:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey.contribs:jersey-spring:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey:jersey-client:jar:1.19.1:compile
[INFO] |  +- com.sun.jersey:jersey-server:jar:1.19.1:compile
[INFO] |  \- com.sun.jersey:jersey-servlet:jar:1.19.1:compile
[INFO] +- jaxen:jaxen:jar:1.1.6:compile
[INFO] +- jcifs:jcifs:jar:1.3.3:compile
[INFO] +- com.jcraft:jsch:jar:0.1.54:compile
[INFO] +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.3:compile
[INFO] |  +- org.glassfish.jaxb:txw2:jar:2.3.3:compile
[INFO] |  +- com.sun.istack:istack-commons-runtime:jar:3.0.11:compile
[INFO] |  \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] +- org.hsqldb:hsqldb:jar:2.3.2:test
[INFO] +- pentaho:simple-jndi:jar:1.0.10:test
[INFO] +- xmlunit:xmlunit:jar:1.3:test
[INFO] +- org.pentaho.reporting.engine:classic-core:test-jar:tests:9.4.0.0-SNAPSHOT:test
[INFO] |  +- org.pentaho.reporting.library:libdocbundle:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libfonts:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  \- com.lowagie:itext:jar:2.1.7:compile
[INFO] |  +- org.pentaho.reporting.library:libformat:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libformula:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libloader:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- org.pentaho.reporting.library:libpixie:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-anim:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-awt-util:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-bridge:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-css:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-dom:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-ext:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-gui-util:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-gvt:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-parser:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-script:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-svg-dom:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-util:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-xml:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-codec:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-transcoder:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-constants:jar:1.9.1:compile
[INFO] |  |  +- org.apache.xmlgraphics:batik-i18n:jar:1.9.1:compile
[INFO] |  |  +- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] |  |  \- org.apache.xmlgraphics:xmlgraphics-commons:jar:2.2:compile
[INFO] |  +- org.pentaho.reporting.library:librepository:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libserializer:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:libxml:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- org.pentaho.reporting.library:flute:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  |  \- org.w3c.css:sac:jar:1.3:compile
[INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:4.1.1:compile
[INFO] |  +- org.apache.poi:poi-ooxml:jar:4.1.1:compile
[INFO] |  +- org.apache.poi:poi:jar:4.1.1:compile
[INFO] |  +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.15:provided
[INFO] |  +- org.apache.commons:commons-math3:jar:3.6.1:provided
[INFO] |  +- com.github.virtuald:curvesapi:jar:1.06:provided
[INFO] |  +- org.apache.commons:commons-compress:jar:1.20:provided
[INFO] |  +- org.apache.xmlbeans:xmlbeans:jar:3.1.0:compile
[INFO] |  +- org.pentaho:commons-database-model:jar:9.4.0.0-SNAPSHOT:compile
[INFO] |  +- bsf:bsf:jar:2.4.0:compile
[INFO] |  +- org.beanshell:bsh:jar:1.3.0:compile
[INFO] |  +- org.codehaus.groovy:groovy-all:jar:2.4.8:compile
[INFO] |  +- org.antlr:antlr-complete:jar:3.5.2:compile
[INFO] |  +- asm:asm:jar:3.2:compile
[INFO] |  +- com.lowagie:itext-rtf:jar:2.1.7:compile
[INFO] |  +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] |  +- net.sf.ehcache:ehcache-core:jar:2.5.1:compile
[INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] |  \- rhino:js:jar:1.7R3:compile
[INFO] +- org.mockito:mockito-all:jar:1.10.19:test
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.9:compile
[INFO] \- org.apache.httpcomponents:httpcore:jar:4.4.11:compile

Suggested solutions:

Update dependency version

Thank you very much.

aa

@pminutillo how kettle use the karaf,and link the OSGI ,how it is used to load the bigdata-plugin,I want to the answer,thank you very much.

Compiling Sample files

Hi folks, I'm trying to compile and run Sample1.java file. Unfortunately I've stumbled upon the following error, after mvn install succeeds:

cd pentaho-reporting/assemblies/samples ; /usr/bin/env "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:63377 -Dfile.encoding=UTF-8 -cp /var/folders/6v/m75gjsgx3j73y1dmspwfv8t80000gn/T/cp_asosgqa4nbz5a26p93vd45pld.jar org.pentaho.reporting.engine.classic.samples.Sample1 
Exception in thread "main" java.lang.NullPointerException: Key data must not be null.
        at org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.createKey(DefaultResourceManagerBackend.java:49)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createKey(ResourceManager.java:141)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createKey(ResourceManager.java:128)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:199)
        at org.pentaho.reporting.engine.classic.samples.Sample1.getReportDefinition(Sample1.java:61)
        at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:149)
        at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:122)
        at org.pentaho.reporting.engine.classic.samples.Sample1.main(Sample1.java:115)

Since the default file didn't work I edited the classloader.getResource line and pointed the absolute file to the .prpt file, but it also fails.

Any hint on what the problem might be?

Cheers!

Improvement - Context locale override

It should be possible to override the contexts' locale lang with a parameter coming from the datasource.
For example I'm using Pentaho for printing invoces from OpenERP but I can't have my invoices transleted in customer's language. It's always in system language.

The overriden parameter could be in the Report configuration:
environment.designtime.Locale = ${lang} to be evaluated and taken from datasource (or it might be passed from pentaho openerp plugin)
or an additionnal attribute in the master report where it would be possible to pass a parameter.

Thank you!

Proper maven repository for community edition?

Any chance to publish updated community edition components to maven central?

I cannot identify easily which maven repository is to be used for community edition.

The latest artifacts do not seem to appear in maven central, and the other reports mentioned around issues are not working or require authentication.

Openerp Data Access and performance problem-Same query executed multiple times

Hello to all,
I have a tricky problem with report's design and odoo/openerp data access.
It seems that queries via ORM are executed more than one time, causing a significant performance degradation.
I try to describe the problem using a simple example (here http://forums.pentaho.com/showthread.php?195396-Openerp-Data-Access-and-performance-problem-Same-query-executed-multiple-times you can find the .prpt file)

Scenario
Report designer (version 5.4 or 6.0)
Postgresql 9.2
Master report with no datasources, only one inline subreport in the "Report Header" section of the master report.
In the subreport there is only one "Openerp Data Access" datasource, configured with a simple model name (res.bank) that consider only two "search fields" (name and phone, for example). These fields are added into the "Details" section of the subreport.
Entering the preview mode and checking the postgres' log with query logging enabled, I notice that the query on res_bank table is executed three times.

This is a big problem when using more than one subreport at time with complex models.
Is this an issue of the connector?
I appreciate any help you can provide.

Error compiling tag 10.1.0.0-139 (cannot get dependencies)

Using JDK11.

Compiling command:
mvn clean install -Dno-osgi

We got this error getting dependencies for this version:

[INFO] Scanning for projects...
Downloading from pentaho-public: https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/org/pentaho/pentaho-ce-jar-parent-pom/10.1.0.0-139/pentaho-ce-jar-parent-pom-10.1.0.0-139.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.pentaho.reporting:pentaho-reporting:10.1.0.0-139: Could not find artifact org.pentaho:pentaho-ce-jar-parent-pom:pom:10.1.0.0-139 in pentaho-public (https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/) and 'parent.relativePath' points at wrong local POM @ line 5, column 11
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.pentaho.reporting:pentaho-reporting:10.1.0.0-139 (C:\SourceCode\pentaho-reporting-10.1.0.0-139\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.pentaho.reporting:pentaho-reporting:10.1.0.0-139: Could not find artifact org.pentaho:pentaho-ce-jar-parent-pom:pom:10.1.0.0-139 in pentaho-public (https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/) and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

The repository only have versions until 9.6.
https://repo.orl.eng.hitachivantara.com/ui/native/pnt-mvn/org/pentaho/pentaho-ce-jar-parent-pom

How can I compile it?

Thanks

When rendering html richtext containing style and fontsize specified in "px" then this text is displayed too big.

There is html fragment of richtext:

<span style=\"font-size:13px\">13px high text here.</span>

It should be rendered as text with height 10pt, but because of bug in org.pentaho.reporting.engine.classic.core.layout.richtext.HtmlRichTextConverter.HtmlRichTextConverter and its function parseLength() it is rendered with font tall 13 inches.

I suspect that it is because of copy&paste error.
See the code:

      if ( "pt".equals( unit ) ) {
        return new Float( nval );
      }
      if ( "in".equals( unit ) ) {
        return new Float( nval * 72 );
      }
      if ( "px".equals( unit ) ) {
        return new Float( nval * 72 );
      }
      if ( "pc".equals( unit ) ) {
        return new Float( nval * 12 );
      }

The size in 'pt' is correct however size in 'px' is wrong.
correct code for 'px' should be:

      if ( "px".equals( unit ) ) {
    	 return Float.valueOf((float) (nval * 0.75)); // 1pt is 1.33px
      }

Here is also junit to test correct behavior

package org.pentaho.reporting.engine.classic.core.layout.richtext;

import org.junit.Test;
import org.pentaho.reporting.engine.classic.core.Band;
import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot;
import org.pentaho.reporting.engine.classic.core.Element;
import org.pentaho.reporting.engine.classic.core.ReportElement;
import org.pentaho.reporting.engine.classic.core.layout.style.SimpleStyleSheet;
import org.pentaho.reporting.engine.classic.core.style.BandDefaultStyleSheet;
import org.pentaho.reporting.engine.classic.core.style.TextStyleKeys;

import junit.framework.TestCase;

public class HtmlRichTextConverterTest extends TestCase {

	@Test
	public void testConvertPxToPt() {
		ClassicEngineBoot.getInstance().start();
		testConversionPxToPt(
		 	"<span style=\"font-size:13px\">13px high text here.</span>",
			"13px high text here.",
			10
		);
		testConversionPxToPt(
			"<span style=\"font-size:26px\">this 26px text has 20pt size.</span>",
			"this 26px text has 20pt size.",
			20
		);
	}

	private void testConversionPxToPt(String aHtml, String aExpectedPlainText, double aExpectedFontSize) {
		HtmlRichTextConverter converter = new HtmlRichTextConverter();
		ReportElement source = new Element();
		source.setComputedStyle(new SimpleStyleSheet(BandDefaultStyleSheet.getBandDefaultStyle()));
		Object result = converter.convert(source, aHtml);
		assertTrue(result instanceof Band);
		Band band = (Band) result;
		Element content = (Element) band.getChildElementsByName("content")[0];
		Object elementAttributeValue = content.getAttribute("http://reporting.pentaho.org/namespaces/engine/attributes/core", "value");
		assertEquals(aExpectedPlainText, elementAttributeValue);
		double fontSize = content.getStyle().getDoubleStyleProperty(TextStyleKeys.FONTSIZE,0.0);
		assertEquals(aExpectedFontSize, fontSize);
	}
}

Could you please fix it and then inform me?

Best Regards

Martin Stejskal

[email protected]

[Consultancy]Does Pentaho Report can output Excel file with macro inside?

We are trying to seek for the reporting solution, which requires to output the Excel files with Macro codes inside, e.g a drop-down list to select some specified values, once any value updates on the drop-down, it will trigger some defined macro code inside and then update related worksheet content.

Not sure whether it is the proper place to get this answered, but still looking forwards to the reply.

Cheers

Maven repo URL does not exist

As specified in README, when I run mvn install, I got an error "Unknown host repo.orl.eng.hitachivantara.com":

Plugin org.codehaus.mojo:build-helper-maven-plugin:3.1.0-pentaho or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:build-helper-maven-plugin:jar:3.1.0-pentaho: Could not transfer artifact org.codehaus.mojo:build-helper-maven-plugin:pom:3.1.0-pentaho from/to pentaho-public (https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn): Transfer failed for https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/org/codehaus/mojo/build-helper-maven-plugin/3.1.0-pentaho/build-helper-maven-plugin-3.1.0-pentaho.pom: Unknown host repo.orl.eng.hitachivantara.com

Border not working on Details Body and Groups

I've been working with PRD since version 3.9.
I had a lot of reports using the borders on detail body, using height to get a fixed border on the page.
Since version 5 the borders are not drawing and the only option is to set compatibility to 3.9.1 on Master Report attributes.

500 error: /api/repo/publish/publishfile

I am using Pentaho 6.0 and trying to publish a file to pentaho server. I am getting 500 error. Below is my HTML markup.

<form method="post" action="/pentaho/api/repo/publish/publishfile" enctype="multipart/form-data">
	<input type="file" name="fileContents" id="fileInputStream"/>
	<input type="text" name="fileInfo" value="Testing_PRPT_File.prpt" />
	<input type="text" name="pathId" value=":Public:CALD" />
	<input type="text" name="overwriteFile" value="true" />
	<input type="submit" value="submit" />
</form>

Request:
img1
Response:
img2

JavaScript global variables not visible in Query Scripting

Hello,

We are using Pentaho Report Designer to generate complex reports and we rely a lot on post processing the query results with JavaScript, but running PRD with java 8 breaks the reports because with the newly JavaScript engine (nashorn) global variables defined in Global Scripting are not visible in Query Scripting.

I think the problem is in DataFactoryScriptingSupport class:

if ( globalContext != null ) {
        final Bindings bindings = globalContext.getBindings( ScriptContext.ENGINE_SCOPE );
        this.context.getBindings( ScriptContext.ENGINE_SCOPE ).putAll( bindings );
}

Since nashorn associates all global variables declared in globalContext with a nashorn global object (https://wiki.openjdk.java.net/display/Nashorn/Nashorn+jsr223+engine+notes) they will not be visible when they are added to query script context: this.context.getBindings( ScriptContext.ENGINE_SCOPE ).putAll( bindings );.

Possible solution:

if ( globalContext != null ) {
        final Bindings bindings = globalContext.getBindings( ScriptContext.ENGINE_SCOPE );
        // this should work since ScriptObjectMirror is implementing Bindings
        Bindings nashornGlobal = bindings.get("nashorn.global");  
        this.context.getBindings( ScriptContext.ENGINE_SCOPE ).putAll(nashornGlobal);
        this.context.getBindings( ScriptContext.ENGINE_SCOPE ).putAll(bindings);
}

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.