← Back to team overview

openjdk team mailing list archive

Bug#863080: openjdk-9-jre:amd64: No conf directory causes exception from security classes

 

Package: openjdk-9-jre
Version: 9~b170-2
Severity: normal

Dear Maintainer,

I was trying to run ./android, from an SDK I downloaded, and I got this exception.

Exception in thread "Loading Sources" java.lang.ExceptionInInitializerError                                                                                                                                                                 
        at java.base/javax.crypto.JceSecurityManager.<clinit>(JceSecurityManager.java:65)                                                                                                                                                   
        at java.base/javax.crypto.Cipher.getConfiguredPermission(Cipher.java:2610)                                                                                                                                                          
        at java.base/javax.crypto.Cipher.getMaxAllowedKeyLength(Cipher.java:2634)                                                                                                                                                           
        at java.base/sun.security.ssl.CipherSuite$BulkCipher.isUnlimited(CipherSuite.java:602)                                                                                                                                              
        at java.base/sun.security.ssl.CipherSuite$BulkCipher.<init>(CipherSuite.java:574)
        at java.base/sun.security.ssl.CipherSuite$BulkCipher.<clinit>(CipherSuite.java:460)
        at java.base/sun.security.ssl.CipherSuite.<clinit>(CipherSuite.java:1074)
        at java.base/sun.security.ssl.SSLContextImpl.getApplicableSupportedCipherSuiteList(SSLContextImpl.java:354)
        at java.base/sun.security.ssl.SSLContextImpl.access$100(SSLContextImpl.java:42)
        at java.base/sun.security.ssl.SSLContextImpl$AbstractTLSContext.<clinit>(SSLContextImpl.java:590)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:291)
        at java.base/java.security.Provider$Service.getImplClass(Provider.java:1848)
        at java.base/java.security.Provider$Service.newInstance(Provider.java:1824)
        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
        at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
        at org.apache.http.conn.ssl.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:202)
        at org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(SSLSocketFactory.java:209)
        at org.apache.http.conn.ssl.SSLSocketFactory.<init>(SSLSocketFactory.java:333)
        at org.apache.http.conn.ssl.SSLSocketFactory.getSocketFactory(SSLSocketFactory.java:165)
        at org.apache.http.impl.conn.SchemeRegistryFactory.createDefault(SchemeRegistryFactory.java:45)
        at org.apache.http.impl.client.AbstractHttpClient.createClientConnectionManager(AbstractHttpClient.java:294)
        at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:445)
        at com.android.sdklib.internal.repository.UrlOpener.openWithHttpClient(UrlOpener.java:369)
        at com.android.sdklib.internal.repository.UrlOpener.openUrl(UrlOpener.java:188)
        at com.android.sdklib.internal.repository.DownloadCache.openUrl(DownloadCache.java:298)
        at com.android.sdklib.internal.repository.DownloadCache.downloadAndCache(DownloadCache.java:681)
        at com.android.sdklib.internal.repository.DownloadCache.openCachedUrl(DownloadCache.java:603)
        at com.android.sdklib.internal.repository.AddonsListFetcher.fetchXmlUrl(AddonsListFetcher.java:272)
        at com.android.sdklib.internal.repository.AddonsListFetcher.fetch(AddonsListFetcher.java:137)
        at com.android.sdklib.internal.repository.updater.PackageLoader.loadRemoteAddonsListInTask(PackageLoader.java:465)
        at com.android.sdklib.internal.repository.updater.PackageLoader.access$200(PackageLoader.java:52)
        at com.android.sdklib.internal.repository.updater.PackageLoader$3.run(PackageLoader.java:435)
        at com.android.sdkuilib.internal.tasks.ProgressView$2.run(ProgressView.java:140)
        at com.android.sdkuilib.internal.tasks.ProgressView.startTask(ProgressView.java:162)
        at com.android.sdkuilib.internal.tasks.ProgressViewFactory.start(ProgressViewFactory.java:46)
        at com.android.sdklib.internal.repository.updater.PackageLoader.loadRemoteAddonsList(PackageLoader.java:432)
        at com.android.sdklib.internal.repository.updater.PackageLoader$1.run(PackageLoader.java:238)
        at com.android.sdkuilib.internal.tasks.ProgressView$2.run(ProgressView.java:130)
        at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
        at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:118)
        ... 41 more
Caused by: java.lang.SecurityException: Can't read cryptographic policy directory: unlimited
        at java.base/javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:324)
        at java.base/javax.crypto.JceSecurity.access$000(JceSecurity.java:73)
        at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:109)
        at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:106)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:105)
        ... 41 more

(Android SDK Manager:5997): GLib-CRITICAL **: Source ID 70 was not found when attempting to remove it

(Android SDK Manager:5997): GLib-CRITICAL **: Source ID 832 was not found when attempting to remove it


The issue is described here https://github.com/docker-library/openjdk/issues/101

And the described workaround:
cd /usr/lib/jvm/java-9-openjdk-amd64 
ln -s lib conf

solves the issue.

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openjdk-9-jre:amd64 depends on:
ii  libasound2                1.1.3-5
ii  libatk-wrapper-java-jni   0.33.3-13
ii  libc6                     2.24-10
ii  libgif7                   5.1.4-0.4
ii  libgl1-mesa-glx [libgl1]  13.0.6-1+b2
ii  libglib2.0-0              2.50.3-2
ii  libgtk2.0-0               2.24.31-2
ii  libjpeg62-turbo           1:1.5.1-2
ii  libpng16-16               1.6.28-1
ii  libx11-6                  2:1.6.4-3
ii  libxext6                  2:1.3.3-1+b2
ii  libxinerama1              2:1.1.3-1+b3
ii  libxrandr2                2:1.5.1-1
ii  openjdk-9-jre-headless    9~b170-2
ii  zlib1g                    1:1.2.8.dfsg-5

Versions of packages openjdk-9-jre:amd64 recommends:
ii  fonts-dejavu-extra  2.37-1
pn  libgconf-2-4        <none>
pn  libgnome-2-0        <none>
pn  libgnomevfs2-0      <none>

Versions of packages openjdk-9-jre:amd64 suggests:
pn  icedtea-8-plugin  <none>

-- no debconf information