Bug 63067

Summary: Ant build fails with Oracle JDK 11.0.1 @ Windows 10 x64 (problem with poifs?)
Product: POI Reporter: gallon.fizik <gallon.fizik>
Component: POIFSAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description gallon.fizik@gmail.com 2019-01-07 18:21:22 UTC
Testsuite: org.apache.poi.hpsf.basic.TestWrite
Tests run: 10, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.119 sec
------------- Standard Error -----------------
Your default character set is windows-1251. However, this testcase must be run in an environment with a default character set supporting at least 8-bit-characters. You can achieve this by setting the LANG environment variable to a proper value, e.g. "de_DE". This testcase is skipped for the default codepage.
------------- ---------------- ---------------

Testcase: writeEmptyPropertySet took 0.001 sec
Testcase: writeTwoSections took 0.001 sec
Testcase: unicodeWrite8Bit took 0 sec
Testcase: inPlaceNPOIFSWrite took 0.101 sec
	Caused an ERROR
build\tmp\poifiles\Test-HPSF16257071657768182756ole2 (The requested operation cannot be performed on a file with a user-mapped section open)
java.io.FileNotFoundException: build\tmp\poifiles\Test-HPSF16257071657768182756ole2 (The requested operation cannot be performed on a file with a user-mapped section open)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
	at org.apache.poi.hpsf.basic.TestWrite.inPlaceNPOIFSWrite(TestWrite.java:565)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

===============================
TestHSSFWorkbook:
Testcase: testRewriteFileBug58480 took 0.004 sec
	FAILED
null
junit.framework.AssertionFailedError
	at org.apache.poi.hssf.usermodel.TestHSSFWorkbook.testRewriteFileBug58480(TestHSSFWorkbook.java:1129)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

==========
Testsuite: org.apache.poi.poifs.nio.TestDataSource
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec

Testcase: testFileWritable took 0.002 sec
	FAILED
Could not delete file build\tmp\poifiles\TestDataSource16374135609496438093.test
junit.framework.AssertionFailedError: Could not delete file build\tmp\poifiles\TestDataSource16374135609496438093.test
	at org.apache.poi.poifs.nio.TestDataSource.testFileWritable(TestDataSource.java:80)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

=============
I build with IntelliJ Idea, project jdk set to jdk11.
Comment 1 Dominik Stadler 2019-03-01 13:38:48 UTC
As far as I see we can compile and run with JDK 11 now, see our documentation for newer JDKs at http://poi.apache.org/help/faq.html#faq-N102B0 for some hints and our CI config at https://builds.apache.org/view/P/view/POI/job/POI-DSL-Windows-1.12/ which shows that even using Java 12 pre-builds should work as well.

So I think this should be fixed if you apply the information above. Please reopen or report a new issue if it still does not work for you then.
Comment 2 Dominik Stadler 2019-03-01 13:39:25 UTC
Also make sure to use a recent checkout as there were changes over time which improved support for newer Java 11/12.