commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Created] (VFS-645) Build fails on Java 9
Date Mon, 02 Oct 2017 22:19:00 GMT
Gary Gregory created VFS-645:
--------------------------------

             Summary: Build fails on Java 9
                 Key: VFS-645
                 URL: https://issues.apache.org/jira/browse/VFS-645
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.1, Nightly Builds, 2.2
         Environment: Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T13:39:06-06:00)
Maven home: C:\Java\apache-maven-3.5.0\bin\..
Java version: 9, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-9
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

            Reporter: Gary Gregory


Running the build with Oracle Java 9 on Windows 10 fails:

{noformat}
Tests run: 84, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.01 sec <<< FAILURE!
- in org.apache.commons.vfs2.provider.jar.test.NestedJarTestCase
testSealing(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests)  Time elapsed: 0 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

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
{noformat}

Also, we get these warnings:

{noformat}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.commons.vfs2.test.AbstractTestSuite (file:/C:/vcs/svn/apache/commons/trunks-proper/vfs/commons-vfs2/target/test-classes/)
to field java.lang.Thread.target
WARNING: Please consider reporting this to the maintainers of org.apache.commons.vfs2.test.AbstractTestSuite
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access
operations
WARNING: All illegal access operations will be denied in a future release
{noformat}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message