Hi All:
I just canceled 2.2 RC1 due to:
- Some silly test failures on non-Windows platform
- Test failures on Java 9
The fixes for the tests are already in trunk.
For Java 9, the current behavior is the same as we have in 2.1: the two
tests fail in the same way:
Tests run: 84, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.146 sec
<<< FAILURE! - in
org.apache.commons.vfs2.provider.jar.test.NestedJarTestCase
testLoadClass(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests) Time
elapsed: 0 sec <<< ERROR!
java.lang.ClassNotFoundException: code.ClassToLoad
at
org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:152)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at
org.apache.commons.vfs2.impl.test.VfsClassLoaderTests.testLoadClass(VfsClassLoaderTests.java:61)
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)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at
org.apache.commons.vfs2.test.AbstractProviderTestCase.runTest(AbstractProviderTestCase.java:190)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at
org.apache.commons.vfs2.test.AbstractTestSuite$1.protect(AbstractTestSuite.java:132)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at
org.apache.commons.vfs2.test.AbstractTestSuite.run(AbstractTestSuite.java:137)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not retrieve
the certificates of
"jar:jar:file:///C:/vcs/svn/apache/commons/trunks-proper/vfs/commons-vfs2/target/test-classes/test-data/nested.jar!/test.jar!/code/ClassToLoad.class".
at
org.apache.commons.vfs2.provider.DefaultFileContent.getCertificates(DefaultFileContent.java:331)
at
org.apache.commons.vfs2.impl.VFSClassLoader.defineClass(VFSClassLoader.java:180)
at
org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:150)
... 27 more
Caused by: java.lang.IllegalStateException: zip file closed
at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:664)
at java.base/java.util.zip.ZipFile.getInputStream(ZipFile.java:334)
at java.base/java.util.jar.JarFile.getBytes(JarFile.java:761)
at
java.base/java.util.jar.JarFile.checkForSpecialAttributes(JarFile.java:970)
at java.base/java.util.jar.JarFile.isMultiRelease(JarFile.java:366)
at
java.base/java.util.jar.JarFile$JarFileEntry.realEntry(JarFile.java:642)
at
java.base/java.util.jar.JarFile$JarFileEntry.getCertificates(JarFile.java:626)
at
org.apache.commons.vfs2.provider.jar.JarFileObject.doGetCertificates(JarFileObject.java:120)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getCertificates(DefaultFileContent.java:325)
... 29 more
testSealing(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests) Time
elapsed: 0.001 sec <<< ERROR!
java.lang.ClassNotFoundException: code.sealed.AnotherClass
at
org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:152)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at
org.apache.commons.vfs2.impl.test.VfsClassLoaderTests.testSealing(VfsClassLoaderTests.java:88)
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)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at
org.apache.commons.vfs2.test.AbstractProviderTestCase.runTest(AbstractProviderTestCase.java:190)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at
org.apache.commons.vfs2.test.AbstractTestSuite$1.protect(AbstractTestSuite.java:132)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at
org.apache.commons.vfs2.test.AbstractTestSuite.run(AbstractTestSuite.java:137)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not retrieve
the certificates of
"jar:jar:file:///C:/vcs/svn/apache/commons/trunks-proper/vfs/commons-vfs2/target/test-classes/test-data/nested.jar!/test.jar!/code/sealed/AnotherClass.class".
at
org.apache.commons.vfs2.provider.DefaultFileContent.getCertificates(DefaultFileContent.java:331)
at
org.apache.commons.vfs2.impl.VFSClassLoader.defineClass(VFSClassLoader.java:180)
at
org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:150)
... 27 more
Caused by: java.lang.IllegalStateException: zip file closed
at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:664)
at java.base/java.util.zip.ZipFile.getInputStream(ZipFile.java:334)
at java.base/java.util.jar.JarFile.getBytes(JarFile.java:761)
at
java.base/java.util.jar.JarFile.checkForSpecialAttributes(JarFile.java:970)
at java.base/java.util.jar.JarFile.isMultiRelease(JarFile.java:366)
at
java.base/java.util.jar.JarFile$JarFileEntry.realEntry(JarFile.java:642)
at
java.base/java.util.jar.JarFile$JarFileEntry.getCertificates(JarFile.java:626)
at
org.apache.commons.vfs2.provider.jar.JarFileObject.doGetCertificates(JarFileObject.java:120)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getCertificates(DefaultFileContent.java:325)
... 29 more
This is likely due to changes in the way Zip supported is implemented in
Java 9 compared to previous Java versions. We have seen in [compress] some
problems in this category IIRC.
Question:
Is it OK to release 2.2 with the same Java Zip test failure as in 2.1? If
not, does any one have clue on fixing this?
Thank you,
Gary