Bug 1448802 - java-1.8.0-openjdk-1.8.0.131 breaks gradle
Summary: java-1.8.0-openjdk-1.8.0.131 breaks gradle
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-08 08:23 UTC by Volker Braun
Modified: 2017-10-13 18:28 UTC (History)
7 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.141-1.b16.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-13 18:28:16 UTC


Attachments (Terms of Use)

Description Volker Braun 2017-05-08 08:23:48 UTC
Description of problem:

I just updated to java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc25.x86_64 and now gradle cannot download dependencies any more due to missing cacerts:

$ gradle
[...]
:compileTestJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':testCompileClasspath'.
> Could not resolve junit:junit:4.+.
  Required by:
      :libtalque-java:1.0
   > Could not resolve junit:junit:4.+.
      > Failed to list versions for junit:junit.
         > Unable to load Maven meta-data from https://repo1.maven.org/maven2/junit/junit/maven-metadata.xml.
            > org.apache.http.ssl.SSLInitializationException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64/jre/lib/security/cacerts (No such file or directory)

This definitely worked before the update. The issue seems to be the removal of the cacerts symlink in http://pkgs.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/commit/?id=4821c37ebebfb8c8d5837258b968356dfe689d25


Somebody opened a bug with gradle: https://github.com/gradle/gradle/issues/1782



Version-Release number of selected component (if applicable):

java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc25.x86_64

How reproducible:

Add junit dependency to build.gradle, and then try to test:

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

Comment 1 jiri vanek 2017-05-09 11:37:32 UTC
I think this is caused by change in  java.security. Old https algorithms are no longer supported

Comment 2 jiri vanek 2017-05-09 11:47:27 UTC
Thsi time md5sum was removed, so  also all MD5withRSA were canceled. 

If you change yours  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc24.x86_64/jre/lib/security/java.security


jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \
and
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768, \

to 
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024, \
and
jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768, \


It should work. If so,please clsoe this. But COnsider this as only tmp solution and get rid of it as soon as possible

Comment 3 Andrew John Hughes 2017-05-10 22:10:26 UTC
We can add back the symlink, but this shouldn't be necessary. The Apache code shouldn't be hardcoding internal JDK paths. That's likely to break with OpenJDK 9 as well.

Comment 4 Andrew John Hughes 2017-05-10 22:11:02 UTC
(In reply to jiri vanek from comment #2)
> Thsi time md5sum was removed, so  also all MD5withRSA were canceled. 
> 
> If you change yours 
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc24.x86_64/jre/lib/security/
> java.security
> 
> 
> jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \
> and
> jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768, \
> 
> to 
> jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024, \
> and
> jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768, \
> 
> 
> It should work. If so,please clsoe this. But COnsider this as only tmp
> solution and get rid of it as soon as possible

It has nothing to do with this. Please don't suggest rolling back a security update without good cause.

Comment 5 Andrew John Hughes 2017-10-13 18:28:16 UTC
This has been fixed since this sync with the RHEL version:

http://pkgs.fedoraproject.org/rpms/java-1.8.0-openjdk/c/928912572e0b93fe1eb252bfe86d3fa4d78846a0?branch=f25


Note You need to log in before you can comment on or make changes to this bug.