Pentaho

 View Only
Expand all | Collapse all

Errors when running job after Update

This thread has been viewed 102 times
  • 1.  Errors when running job after Update

    Posted 04-12-2023 07:46

    Hi everyone,

    I'm Update PDI CE 9.3 to 9.4 on a Windows Server 2016.
    When I run a job, I get the following error message, how can I fix this error?

    Thank you in advance for any help.

    07:00:36,266 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,273 ERROR [BSFManager] Exception :
    java.lang.ClassNotFoundException: bsh.util.BeanShellBSFEngine
    	at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_221]
    	at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_221]
    	at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_221]
    	at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:693) [bsf-2.4.0.jar:?]
    	at org.apache.bsf.BSFManager.eval(BSFManager.java:435) [bsf-2.4.0.jar:?]
    	at org.pentaho.plugin.jfreereport.reportcharts.AbstractChartExpression.postProcessChart(AbstractChartExpression.java:593) [legacy-charts-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.plugin.jfreereport.reportcharts.AbstractChartExpression.getValue(AbstractChartExpression.java:560) [legacy-charts-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.sys.AttributeExpressionsEvaluator.evaluate(AttributeExpressionsEvaluator.java:183) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.sys.AttributeExpressionsEvaluator.evaluateElement(AttributeExpressionsEvaluator.java:125) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.processBand(AbstractElementFormatFunction.java:569) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.processRootBand(AbstractElementFormatFunction.java:541) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsStarted(AbstractElementFormatFunction.java:223) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireItemsStartedEvent(ExpressionEventHelper.java:147) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireReportEvent(ExpressionEventHelper.java:45) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:161) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:1120) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.BeginDetailsHandler.advance(BeginDetailsHandler.java:47) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:948) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:673) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:502) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.execute(ReportExportTask.java:127) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.run(ReportExportTask.java:114) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:438) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processRow(PentahoReportingOutput.java:157) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) [kettle-engine-9.4.0.0-343.jar:9.4.0.0-343]
    	at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]


    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 2.  RE: Errors when running job after Update

    Posted 04-12-2023 11:21

    HI Michael,
    try this. Move bsh-1.3.0.jar from plugins/pentaho-reporting-plugins/lib to lib directory.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 3.  RE: Errors when running job after Update

    Posted 04-14-2023 03:10

    Hi Petr,
    thank you for your answer.
    I add the libs bsh-1.3.0.jar and bsf-2.4.0.jar to the data-integration\lib directory

    Error message:

    07:00:33,382 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,410 ERROR [BSFManager] Exception :
    java.lang.ClassCastException: bsh.util.BeanShellBSFEngine cannot be cast to org.apache.bsf.BSFEngine
    	at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:697) [bsf-2.4.0.jar:?]
    	at org.apache.bsf.BSFManager.eval(BSFManager.java:435) [bsf-2.4.0.jar:?]
    	at org.pentaho.plugin.jfreereport.reportcharts.AbstractChartExpression.postProcessChart(AbstractChartExpression.java:593) [legacy-charts-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.plugin.jfreereport.reportcharts.AbstractChartExpression.getValue(AbstractChartExpression.java:560) [legacy-charts-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.sys.AttributeExpressionsEvaluator.evaluate(AttributeExpressionsEvaluator.java:183) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.sys.AttributeExpressionsEvaluator.evaluateElement(AttributeExpressionsEvaluator.java:125) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.processBand(AbstractElementFormatFunction.java:569) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.processRootBand(AbstractElementFormatFunction.java:541) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsStarted(AbstractElementFormatFunction.java:223) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireItemsStartedEvent(ExpressionEventHelper.java:147) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireReportEvent(ExpressionEventHelper.java:45) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:161) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:1120) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.BeginDetailsHandler.advance(BeginDetailsHandler.java:47) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:948) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:673) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:502) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433) [classic-core-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.execute(ReportExportTask.java:127) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.ReportExportTask.run(ReportExportTask.java:114) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processReport(PentahoReportingOutput.java:438) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.processRow(PentahoReportingOutput.java:157) [pentaho-reporting-plugins-impl-9.4.0.0-343.jar:9.4.0.0-343]
    	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) [kettle-engine-9.4.0.0-343.jar:9.4.0.0-343]
    	at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]



    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 4.  RE: Errors when running job after Update

    Posted 04-14-2023 03:31

    No add, must move. Delete jars from lib directory of plugin.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 5.  RE: Errors when running job after Update

    Posted 04-17-2023 03:38

    Hi Petr,
    thank you. Now only the following error messages are displayed.
    How can i fix this error?

    07:00:41,804 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:41,917 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:41,950 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:41,968 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:41,986 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:42,015 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:42,564 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:42,598 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:42,640 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:42,652 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,361 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,382 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,403 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,420 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,433 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,477 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,821 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:43,857 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.

     



    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 6.  RE: Errors when running job after Update

    Posted 04-17-2023 05:49

    Hi Michael,
    scripting is disabled by default in Pentaho v9.4 There are two way how to fix it.

    Do not use postprocess scripting on charts.

    Or you must enable explicitly. See my comment in another thread.




    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 7.  RE: Errors when running job after Update

    Posted 04-17-2023 09:47

    Hi Petr,
    do I have this right, enable classic-engine.properties is done in the reportdesinger?




    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 8.  RE: Errors when running job after Update

    Posted 04-17-2023 10:11

    Sorry Michael, I don't known. I'm not primary user of report designer. May be this works, so you can test it. ;)

    I mean classic-engine.properties file in resources directory of designer install directory.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 9.  RE: Errors when running job after Update

    Posted 04-18-2023 05:42

    Hi Petr,

    I have Test it, error is still present.

    The file classic-engine.properties is in the Folder.
    C:\Program Files (x86)\pentaho\report-designer\resources\classic-engine.properties

    Where should I add the file classic-engine.properties in C:\Program Files (x86)\pentaho\data-integration\ to enable it?

    Thank you



    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 10.  RE: Errors when running job after Update

    Posted 04-20-2023 15:09

    You can add file to classes directory.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 11.  RE: Errors when running job after Update

    Posted 04-21-2023 03:49

    I have add the file in the directory.

    C:\Program Files (x86)\pentaho\data-integration\classes>dir /s /b classic-engine.properties
    C:\Program Files (x86)\pentaho\data-integration\classes\classic-engine.properties
    C:\Program Files (x86)\pentaho\data-integration\classes\resources\classic-engine.properties


    Error still present. :-(

    07:00:33,416 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,527 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,556 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,572 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,587 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:33,624 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:34,219 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:34,271 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:34,282 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:34,322 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,477 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,524 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,546 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,563 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,578 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,634 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:35,995 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,030 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,040 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,050 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,929 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,953 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,969 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,981 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:36,991 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:37,099 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:37,490 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:37,515 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.
    07:00:37,525 ERROR [AbstractChartExpression] Scripts are prevented from running by default in order to avoid potential remote code execution.  The system administrator must enable this capability.




    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 12.  RE: Errors when running job after Update

    Posted 04-21-2023 05:36

    Report works in designer and doesn't work in PDI?



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 13.  RE: Errors when running job after Update

    Posted 05-02-2023 08:38

    Hi Petr,

    sorry for the late reply, the reports works in both PDI and PRD.
    Error message i get from PDI.

    Thank you



    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------



  • 14.  RE: Errors when running job after Update
    Best Answer

    Posted 05-04-2023 06:24

    I looked at to source code and this error is rather warning. Script is executed every time.
    I modified sample from PRD and check if error is logged by designer too. So designer logged error too only you did see it (message is .pentaho/logs/prd.log in your home dir).

    But If add this property to classic-engine.properties in resources directory, error disappeared.
    org.pentaho.reporting.engine.classic.core.allowScriptEvaluation=true

    in PDI is behaviour identical. Create or copy classic-engine.properties to directory classes in PDI root dir. Delete classes/resources dir.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 15.  RE: Errors when running job after Update

    Posted 05-05-2023 06:17

    I copied the classic-engine.properties file from PRD to PDI, only with this entry org.pentaho.reporting.engine.classic.core.allowScriptEvaluation=true in the file.

    Thank you very much @Petr for your answers and your help, this solution works for me.



    ------------------------------
    Michael Held
    DBA
    University
    ------------------------------