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

Pentaho BI Platform Tracking | Will Gorman | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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.

    Pentaho BI Platform Tracking | 8 years ago | 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
  2. 0

    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.

    Pentaho BI Platform Tracking | 8 years ago | 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

    Root Cause Analysis

    1. 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()
    2. org.pentaho.reporting
      Worker.run
      1. org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet.setStyleProperty(ElementStyleSheet.java:868)
      2. org.pentaho.reporting.engine.classic.core.Element$InternalElementStyleSheet.setStyleProperty(Element.java:367)
      3. org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.evaluateElement(MetaDataStyleEvaluator.java:312)
      4. org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processBand(MetaDataStyleEvaluator.java:198)
      5. org.pentaho.reporting.engine.classic.core.function.sys.MetaDataStyleEvaluator.processRootBand(MetaDataStyleEvaluator.java:170)
      6. org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction.itemsAdvanced(AbstractElementFormatFunction.java:121)
      7. org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireItemsAdvancedEvent(SubLayoutProcess.java:277)
      8. org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:214)
      9. org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:834)
      10. org.pentaho.reporting.engine.classic.core.states.process.ProcessDetailsHandler.advance(ProcessDetailsHandler.java:59)
      11. org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:646)
      12. org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPaginationLevel(AbstractReportProcessor.java:602)
      13. org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:432)
      14. org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90)
      15. org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:270)
      16. org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187)
      16 frames