java.lang.ClassCastException: Value for key font-size is not assignable: class java.math.BigDecimal is not assignable from class java.lang.Integer

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I got the following exception when I set metadata-styling to true: java.lang.ClassCastException: Value for key font-size is not assignable: class java.math.BigDecimal is not assignable from class java.lang.Integer at org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet.setStyleProperty(ElementStyleSheet.java:868) at org.pentaho.reporting.engine.classic.core.Element$InternalElementStyleSheet.setStyleProperty(Element.java:367) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.evaluateElement(MetaDataStyleEvaluator.java:312) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processBand(MetaDataStyleEvaluator.java:198) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processRootBand(MetaDataStyleEvaluator.java:170) at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsAdvanced(AbstractElementFormatFunction.java:121) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireItemsAdvancedEvent(SubLayoutProcess.java:277) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:214) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:834) at org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.advance(ProcessDetailsHandler.java:59) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:646) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:602) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:432) at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90) at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:270) at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187) I fixed this temporarily by commenting out the check on line 866 of ElementStyleSheet. See case PRD-1274 for the metadata xmi file as well as the prpt file used to create the error.
    via by Will Gorman,
  • I got the following exception when I set metadata-styling to true: java.lang.ClassCastException: Value for key font-size is not assignable: class java.math.BigDecimal is not assignable from class java.lang.Integer at org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet.setStyleProperty(ElementStyleSheet.java:868) at org.pentaho.reporting.engine.classic.core.Element$InternalElementStyleSheet.setStyleProperty(Element.java:367) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.evaluateElement(MetaDataStyleEvaluator.java:312) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processBand(MetaDataStyleEvaluator.java:198) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processRootBand(MetaDataStyleEvaluator.java:170) at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsAdvanced(AbstractElementFormatFunction.java:121) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireItemsAdvancedEvent(SubLayoutProcess.java:277) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:214) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:834) at org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.advance(ProcessDetailsHandler.java:59) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:646) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:602) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:432) at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90) at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:270) at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187) I fixed this temporarily by commenting out the check on line 866 of ElementStyleSheet. See case PRD-1274 for the metadata xmi file as well as the prpt file used to create the error.
    via by Will Gorman,
    • java.lang.ClassCastException: Value for key font-size is not assignable: class java.math.BigDecimal is not assignable from class java.lang.Integer at org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet.setStyleProperty(ElementStyleSheet.java:868) at org.pentaho.reporting.engine.classic.core.Element$InternalElementStyleSheet.setStyleProperty(Element.java:367) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.evaluateElement(MetaDataStyleEvaluator.java:312) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processBand(MetaDataStyleEvaluator.java:198) at org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processRootBand(MetaDataStyleEvaluator.java:170) at org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsAdvanced(AbstractElementFormatFunction.java:121) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireItemsAdvancedEvent(SubLayoutProcess.java:277) at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:214) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:834) at org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.advance(ProcessDetailsHandler.java:59) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:646) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:602) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:432) at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90) at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:270) at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187)
    No Bugmate found.