Menu

Problem Font.getBoldweight()

2018-05-15
2018-05-31
  • Daniel Simão Belo

    Testing a new version of JETT 0.11.0, I found this problem:

    Exception in thread "Thread-500" java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Font.getBoldweight()S
    at net.sf.jett.model.CellStyleCache.getRepresentation(CellStyleCache.java:223)
    at net.sf.jett.model.CellStyleCache.getRepresentation(CellStyleCache.java:174)
    at net.sf.jett.model.CellStyleCache.cacheCellStyle(CellStyleCache.java:143)
    at net.sf.jett.model.CellStyleCache.cachePreExistingCellStyles(CellStyleCache.java:62)
    at net.sf.jett.model.CellStyleCache.<init>(CellStyleCache.java:50)
    at net.sf.jett.transform.ExcelTransformer.createContext(ExcelTransformer.java:604)
    at net.sf.jett.transform.ExcelTransformer.createContext(ExcelTransformer.java:572)
    at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:400)
    at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:379)</init>

    Inside the class code: 'CellStyleCache.class' the metod 'getBoldweight()' is spelled wrong, the correct one is getBoldWeight().

    Thank's.

     
  • Randy Gettman

    Randy Gettman - 2018-05-31

    Daniel,

    Are you sure you're using the version of Apache POI that JETT was built on? The current version of JETT (0.11.0) is compiled against Apache POI 3.14. In that version, the Font interface has the method getBoldweight().

    It appears that there are incompatible changes between Apache POI 3.14 and later versions up through 3.17. This includes the fact that 3.17's Font interface has getBold().

    At some point I'll get around to upgrading JETT to 3.17.

    Randy

     

Log in to post a comment.

MongoDB Logo MongoDB