Класс не найден для Apache Poi - PullRequest
0 голосов
/ 25 июня 2018


Я использую Apache POI (3.17) для создания нескольких листов с диаграммами.
Когда я использую, я сталкиваюсь со следующей проблемой:

XSSFChartAxis bottomAxis = chart.getChartAxisFactory().createCategoryAxis(AxisPosition.BOTTOM);
bottomAxis.getMajorGridLines(); // here give error


оно выдает:

The type org.openxmlformats.schemas.drawingml.x2006.chart.CTChartLines cannot be resolved. It is indirectly referenced from required .class files<br>
The method getMajorGridLines() from the type XSSFChartAxis refers to the missing type CTChartLines
<br>The method addNewMajorGridlines() from the type CTValAx refers to the missing type CTChartLines

my pom.xml

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.17</version>
</dependency>
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.17</version>
</dependency>

Я нашел этот класс в ooxml-схемах 1.3, но сейчас мы работаем с poi-ooxml-схемами 3.17.
Как я могу решить эту проблему?

1 Ответ

0 голосов
/ 25 июня 2018

@ Gagravarr спасибо за ответ, так как я искал, я не смог найти эту ссылку. Я добавляю зависимость и больше нет ошибок.

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>ooxml-schemas</artifactId>
    <version>1.3</version>
</dependency>
...