[jira] [Commented] (DERBY-6856) Make it possible to build Derby using JDK 9

2016-12-07 Thread Rick Hillegas (JIRA)

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

Rick Hillegas commented on DERBY-6856:
--

The permissions issue which surfaced in jdk9 build 144 is tracked by the 
following jdk bug: 
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8170844

Instructions for following the progress of jdk bugs can be found here: 
http://robilad.livejournal.com/139637.html

> 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: PTest.java, 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, 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)


Re: JDK 9 & JDK 9 with Project Jigsaw b144 are available on java.net

2016-12-07 Thread Rick Hillegas
Thanks, Rory. I have cross-linked the jdk and Derby bugs here: 
https://issues.apache.org/jira/browse/DERBY-6856


Thanks,
-Rick

On 12/7/16, 12:19 AM, Rory O'Donnell wrote:



Hi Rick,

The bug is now in the bug system - JDK-8170844

Dalibor has described how to track your issues in the JDK bug system 
here. 


Rgds,Rory



On 07/12/2016 02:24, Rick Hillegas wrote:
Thanks, Rory. I have logged a bug, which was assigned the internal 
review ID 9045931.


Thanks,
-Rick

On 12/5/16, 11:56 PM, Rory O'Donnell wrote:


Hi Rick,

Please use http://bugs.java.com/

Rgds,Rory

On 06/12/2016 02:17, Rick Hillegas wrote:

On 12/5/16, 1:32 AM, Rory O'Donnell wrote:


Hi Rick,

Can you log a bug and send us the Java Incident number, I will 
follow up.


Thanks for responding quickly, Rory. I'm afraid I don't know what 
bug system to use. Is it the OpenJDK bug system hosted here


https://bugs.openjdk.java.net/secure/Dashboard.jspa

and described here

https://wiki.openjdk.java.net/display/general/JBS+Overview

According to that second link, I need to leap over some hurdles in 
order to log a bug. I need a JBS account with Author (or greater) 
privilege. Is this the process to follow, or should I be looking at 
some other bug system?


Thanks,
-Rick


Rgds,Rory


On 03/12/2016 19:40, Rick Hillegas wrote:

Hi Rory,

Build 140 did not display the file permissions problems described 
here: 
http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-October/005062.html. 
However, I did see file permissions problems with JDK 9 build 
144. It has taken me a while to write a compact repro for the 
file permissions problems, but I have finally succeeded. My 
results are described in the comments dated from 2016-11-15 
through 2016-12-03 on the following JIRA issue: 
https://issues.apache.org/jira/browse/DERBY-6856


I am attaching the repro to this mail message, along with the 
following summary, copied from DERBY-6856:


---

It has taken me a while, but I now have a compact repro for the 
regression in JDK 9 build 144. I am attaching the following files:


  PTest.java - A test which shows this problem

  ptestScript - A script for building the test and running it

To show the problem, put PTest.java in the current directory and 
run ptestScript. The script will compile the test class and put 
the test class inside a jar file in the parent directory. Then 
the script will run the test in setup mode, creating a 
subdirectory of the current directory and a policy file. Finally, 
the script will run the test under a security manager, 
demonstrating the problem on JDK 9 build 144.


I have observed the following:

1) The problem only occurs if the jar file which receives 
privileges is in the parent directory of the current directory. 
If the jar file is in the current directory, then the problem 
does not occur.


2) The problem only occurs if the policy file grants write 
permission as well as read permission on the target directory.


Here is the output of the script when it is run using JDK 8:

--

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Compile the test and jar it up...
Run the test in setup mode, creating a subdirectory and policy 
file...

Policy file is...
grant codeBase "file:/Users/rhillegas/derby/PTest.jar" {
  permission java.io.FilePermission 
"/Users/rhillegas/derby/mainline/ptestdir/-", "write";
  permission java.io.FilePermission 
"/Users/rhillegas/derby/mainline/ptestdir/-", "read";

};

Now run the experiment under a security manager...
Checking for existence of 
/Users/rhillegas/derby/mainline/ptestdir/zdummy.txt

'/Users/rhillegas/derby/mainline/ptestdir/zdummy.txt' exists = false

--

Here is the output from the script when the current environment 
uses jdk 9 build 144:


--

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+144)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+144, mixed mode)
Compile the test and jar it up...
Run the test in setup mode, creating a subdirectory and policy 
file...

Policy file is...
grant codeBase "file:/Users/rhillegas/derby/PTest.jar" {
  permission java.io.FilePermission 
"/Users/rhillegas/derby/mainline/ptestdir/-", "write";
  permission java.io.FilePermission 
"/Users/rhillegas/derby/mainline/ptestdir/-", "read";

};

Now run the experiment under a security manager...
Checking for existence of 
/Users/rhillegas/derby/mainline/ptestdir/zdummy.txt
Caught a java.security.AccessControlException bearing this 
message: access denied ("java.io.FilePermission" 
"/Users/rhillegas/derby/mainline/ptestdir/zdummy.txt" "read")


--

Best regards,
-Rick

On 11/14/16, 4:04 AM, Rory O'Donnell wrote:



Hi Rick,

Early Access b144  (#5709) for 
JDK 9 with Project Jigsaw is available on java.net, summary of 
changes are listed here.