jameskleeh / groovy-excel-builder

A Groovy DSL for Building Excel Files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

com.jameskleeh.excel.Font issue

ahumphr opened this issue · comments

Hi,

Using the simple example

sheet {
row { "test1"}
}

and the library via maven :

    <dependency>
        <groupId>com.jameskleeh</groupId>
        <artifactId>excel-builder</artifactId>
        <version>0.4.0</version>
    </dependency>

Java 1.7 .0_45, Grails 2.2.5, Groovy 2.0.8, poi 3.16

I'm getting an exception as follows:

the number of constructors during runtime and compile time for com.jameskleeh.excel.Font do not match. Expected -1 but got 2. Stacktrace follows:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [exportAuftragspositionen] of controller [de.interseroh.dienstleistungsportal.reporting.ReportingController] caused exception: Runtime error executing action
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Runtime error executing action
... 3 more
Caused by: java.lang.reflect.InvocationTargetException
... 3 more
Caused by: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for com.jameskleeh.excel.Font do not match. Expected -1 but got 2
at com.jameskleeh.excel.Sheet.row(Sheet.groovy:176)
at com.jameskleeh.excel.Sheet.row(Sheet.groovy:151)
at de.interseroh.dienstleistungsportal.reporting.Excel2007BuildExporter$_exportData_closure1_closure2.doCall(Excel2007BuildExporter.groovy:20)
at com.jameskleeh.excel.Workbook.handleSheet(Workbook.groovy:114)
at com.jameskleeh.excel.Workbook.sheet(Workbook.groovy:55)
at de.interseroh.dienstleistungsportal.reporting.Excel2007BuildExporter$_exportData_closure1.doCall(Excel2007BuildExporter.groovy:19)
at com.jameskleeh.excel.ExcelBuilder.build(ExcelBuilder.groovy:55)
at com.jameskleeh.excel.ExcelBuilder.output(ExcelBuilder.groovy:40)

Any idea what could be causing this. Is there a minimum Groovy version requirement?

Perhaps it is a groovy compatibility problem. 2.0.x is pretty old. As you can see the Font class is about as simple as it gets

https://github.com/jameskleeh/groovy-excel-builder/blob/master/src/main/groovy/com/jameskleeh/excel/Font.groovy

Could also be a JDK issue. I compile this library with Java 8

No feedback in 3 weeks so I'm closing this