JDK-8228403 : SignTwice.java failed with java.io.FileNotFoundException: File name too long
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-18
  • Updated: 2022-03-23
  • Resolved: 2019-07-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13 JDK 14
13 b32Fixed 14Fixed
Related Reports
Relates :  
Description
It is using very long file names that can be too long if the workspace has a long name, it would appear.  It looks like the file name could be half the size:

java.io.FileNotFoundException: longfilename-JDK_13-internal-0-2019-07-18-1830384.anthony.scarpino.stateless-update-CERT_nr3_DSA_SHA-512-DIGESTALG_SHA-512-signagainunmodified-JDK_13-internal-0-2019-07-18-1830384.anthony.scarpino.stateless-update-CERT_nr3_DSA_SHA-512-DIGESTALG_SHA-512.jar (File name too long) 
at java.base/java.io.FileOutputStream.open0(Native Method) 
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292) 
at java.base/java.io.FileOutputStream.(FileOutputStream.java:235) 
at java.base/java.io.FileOutputStream.(FileOutputStream.java:185) 
at jdk.jartool/sun.security.tools.jarsigner.Main.signJar(Main.java:1633) 
at jdk.jartool/sun.security.tools.jarsigner.Main.run(Main.java:269) 
at jdk.jartool/sun.security.tools.jarsigner.Main.main(Main.java:118) 
Comments
Git URL: https://github.com/openjdk/jdk/commit/804e840856d7593eb64faa7c84a4b02397af0bc7
23-03-2022

URL: https://hg.openjdk.java.net/jdk/jdk13/rev/57a391a23f7f User: jjiang Date: 2019-07-27 02:07:15 +0000
27-07-2019

Or maybe you can simply use 1,2,3.. for different JDKs in jdkList?
25-07-2019

The java.runtime.version of the testing JDK build looks too long. If just use java.version, the file names cannot be distinguished with different builds on the same jdk release.
25-07-2019

[~weijun] Can you take a look at this one?
24-07-2019