[ 
https://issues.apache.org/jira/browse/DERBY-6856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15822871#comment-15822871
 ] 

Rick Hillegas commented on DERBY-6856:
--------------------------------------

Unfortunately, build 151 does not fix the following problem which surfaced in 
build 148: the failure of our test harness to find the derbyall suite. The 
problem seems to be that the Java 9 class loader no longer finds resources 
which the Java 8 class loader can locate. The following sample program 
demonstrates this problem. Compile this program with jdk 8 and put the derby 
jars on your classpath. This is the output when you run the program on jdk 8...

input stream = 
sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@3f99bd52

...and this is the output when you run the program on jdk 9...

input stream = null

Here is the program:

{noformat}
public class Derby6856_MissingResource
{
  public static void main(String... args) throws Exception
  {
    String resourceName = 
"/org/apache/derbyTesting/functionTests/suites/derbyall.properties";
    Class dummyClass = (new Object()).getClass();
    Object is = dummyClass.getResourceAsStream(resourceName);

    System.out.println("input stream = " + is);
  }
}
{noformat}

It appears that resource resolution has changed significantly in the recent 
builds of JDK 9. I expect that this change will be an unwelcome surprise to 
many users.


> Make it possible to build Derby using JDK 9
> -------------------------------------------
>
>                 Key: DERBY-6856
>                 URL: https://issues.apache.org/jira/browse/DERBY-6856
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.12.1.1
>            Reporter: Rick Hillegas
>         Attachments: derby-6856-01-ab-addShardingKey.diff, 
> derby-6856-01-ac-cleanup.diff, derby-6856-02-aa-addShardingKey.diff, 
> derby-6856-03-aa-autoboxingDeprecationWarnings.diff, 
> derby-6856-03-ab-autoboxingDeprecationWarnings.diff, 
> derby-6856-04-aa-autoboxingDeprecationWarnings-part2.diff, 
> derby-6856-04-ab-autoboxingDeprecationWarnings-part2.diff, 
> derby-6856-05-ac-roundingMode-Class.newInstance.diff, 
> derby-6856-05-af-roundingMode-Class.getDeclaredConstructor.diff, 
> derby-6856-05-ag-roundingMode-Class.newInstance.diff, 
> derby-6856-06-aa-observable.diff, derby-6856-07-aa-oneMoreNewInstance.diff, 
> derby-6856-08-aa-cleanupJavadoc.diff, derby-6856-09-aa-javadocEntities.diff, 
> derby-6856-XX-ab-base.diff, derby-6856-XX-ac-base.diff, PTest.java, 
> ptestScript
>
>
> Derby can't be built with JDK 9. Java 9 introduces new JDBC classes like 
> java.sql.ShardingKey and methods which refer to these new classes.
> In addition, project Jigsaw has created a new way to name classes (see 
> http://openjdk.java.net/jeps/220). This breaks the PropertySetter build tool 
> which we use so that old JVMs can compile Derby and so that Derby can be 
> compiled to run on old JVMs.
> It is likely that we will need to leave this issue open throughout the 
> development cycle of Java 9.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to