You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2025/06/26 18:48:48 UTC

[Bug 69729] New: Unable to build POI 5.4.1 with JDK 8

https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

            Bug ID: 69729
           Summary: Unable to build POI 5.4.1 with JDK 8
           Product: POI
           Version: 5.4.1-FINAL
          Hardware: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: shilpabtl@gmail.com
  Target Milestone: ---

I use apache-poi and related libraries in my project. Recently came across the 
vulnerabilities and fix for them are in the latest version of Apache-poi:-5.4.1

TO build the source code with JDK 8 (JDK 8 is what used in my project) I
downloaded the source code from:
https://poi.apache.org/download.html#POI-5.4.1

However, building the source code results in the errors indicating that POI and
sub modules doesn't support JDK -8. 
Following modules in specific: poi-ooxml-lite-agent and even other modules
under poi. Infact source code uses module-path and other features not supported
in Java -8.

However, JDK support metrics clearly calls out that POI supports JDK-8 : 
https://poi.apache.org/ 
as " POI requires Java 8 or newer since version 4.0.1."

Can you confirm if POI can be build with JDK 8 ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
POI's Gradle build uses docs.gradle.org/current/userguide/toolchains.html to
manage being able to build the module-info classes even if the build is run
with Java 8. Basically, Gradle will find on your machine or download Java 11 in
order to build the module-info classes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #7 from PJ Fanning <fa...@yahoo.com> ---
The thing is that Gradle already is configured to do this for you.
The OP has not even stated what the issue is. If you read their question on
stackoverflow, they are providing little or no evidence of work to back up
their claims.

https://stackoverflow.com/questions/79678792/is-it-possible-to-build-apache-poi-5-4-1-with-jdk-8

The releases that I do are based on grabbing the Java 8 build artifacts from
ci-builds.apache.org. Our build is robust enough to actually compile the
module-info even if you start with Java 8 to run the build. We used to have
module-info class files checked in to support Java 8 building but this is no
longer needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

Axel Howind <ax...@dua3.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INFORMATIONPROVIDED

--- Comment #9 from Axel Howind <ax...@dua3.com> ---
Sorry, the exclamation mark in my other comment was accidental. I don’t think
anything has to be done here

OP: POI is compatible with java 8. The library is not meant to be compiled from
source by projects that have it as a dependency. You should either download the
jars or better use the maven coordinates to let your build tool provide the
dependency.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #3 from Shilpa BN <sh...@gmail.com> ---
Created attachment 40052
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=40052&action=edit
Error screenshot

This image contains the command ran against the project and the error received.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INFORMATIONPROVIDED
             Status|NEW                         |RESOLVED

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
JDK 8 build works fine here.

https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8/

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

Shilpa BN <sh...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INFORMATIONPROVIDED         |---

--- Comment #4 from Shilpa BN <sh...@gmail.com> ---
Downloaded the Apache POI-5.4.1 project, extracted and ran the below command:

 gradle clean build -x test

But getting below error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':poi-ooxml-lite-agent:compileJava9'.
> Error while evaluating property 'javaCompiler' of task ':poi-ooxml-lite-agent:compileJava9'.
   > Failed to calculate the value of task ':poi-ooxml-lite-agent:compileJava9'
property 'javaCompiler'.
      > Cannot find a Java installation on your machine (Windows 11 10.0 amd64)
matching: {languageVersion=11, vendor=any vendor,
implementation=vendor-specific, nativeImageCapable=false}. Toolchain download
repositories have not been configured.

Attached the image with more information.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 69729] New: Unable to build POI 5.4.1 with JDK 8

Posted by stanton fisque <sf...@gmail.com>.
are you building POI or are you building WITH POI (as a dependency)?  it is unclear based on the verbiage of the ticket.  if you are building WITH poi, are you overriding any of its transitive dependencies with versions/implementations built with newer java version?

if you're actually building POI, and it's failing with jdk-8, this points to a possible environmental issue.


Stanton Fisque
principal technologist
latticeware.com
portland, oregon

> On Jun 26, 2025, at 11:48 AM, bugzilla@apache.org wrote:
> 
> https://bz.apache.org/bugzilla/show_bug.cgi?id=69729
> 
>            Bug ID: 69729
>           Summary: Unable to build POI 5.4.1 with JDK 8
>           Product: POI
>           Version: 5.4.1-FINAL
>          Hardware: PC
>            Status: NEW
>          Severity: critical
>          Priority: P2
>         Component: POI Overall
>          Assignee: dev@poi.apache.org
>          Reporter: shilpabtl@gmail.com
>  Target Milestone: ---
> 
> I use apache-poi and related libraries in my project. Recently came across the 
> vulnerabilities and fix for them are in the latest version of Apache-poi:-5.4.1
> 
> TO build the source code with JDK 8 (JDK 8 is what used in my project) I
> downloaded the source code from:
> https://poi.apache.org/download.html#POI-5.4.1
> 
> However, building the source code results in the errors indicating that POI and
> sub modules doesn't support JDK -8. 
> Following modules in specific: poi-ooxml-lite-agent and even other modules
> under poi. Infact source code uses module-path and other features not supported
> in Java -8.
> 
> However, JDK support metrics clearly calls out that POI supports JDK-8 : 
> https://poi.apache.org/ 
> as " POI requires Java 8 or newer since version 4.0.1."
> 
> Can you confirm if POI can be build with JDK 8 ?
> 
> -- 
> You are receiving this mail because:
> You are the assignee for the bug.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #5 from Axel Howind <ax...@dua3.com> ---
I think you actually do need a Java 9 compiler (for the module info), even when
a java 8 compiler is used for the rest. So yes, you technically need a java 9
compiler to build even if the resulting jar will be java 8 compatible.

We could probably facilitate this! Using a toolchains for the java 9 part too ,
but at least for the next major release I think we should actually think about
finally dropping Java 8 support, and we could even think about requiring at
least 17 IMHO.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #8 from PJ Fanning <fa...@yahoo.com> ---
I would suggest that you install Java 8 and Java 11 if Gradle on Windows can't
download Java 11 for you.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
I updated the text at https://poi.apache.org/devel/index.html via r1926808 to
mention JDK 11.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 69729] Unable to build POI 5.4.1 with JDK 8

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69729

Shilpa BN <sh...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shilpabtl@gmail.com
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org