Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377665 - www-client/firefox-5.0-r2 could not connect to java console with error: Could not initialize class javax.crypto.SunJCE_b
Summary: www-client/firefox-5.0-r2 could not connect to java console with error: Could...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 07:32 UTC by Marco Clocchiatti
Modified: 2011-11-11 21:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge.info (emerge.info,6.35 KB, text/plain)
2011-08-04 07:33 UTC, Marco Clocchiatti
Details
log from java-console (java-console.log,5.22 KB, text/plain)
2011-08-04 07:34 UTC, Marco Clocchiatti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Clocchiatti 2011-08-04 07:32:14 UTC
firefox could not connect to a qemu virtualized console.
this is my dev-java/ configuration:

cloc3@s939 ~ $ qlist -ICSUv dev-java/
dev-java/ant-core-1.8.1 0
dev-java/ant-nodeps-1.8.1 0
dev-java/bcmail-1.45 0
dev-java/bcprov-1.45 0 (userland_GNU)
dev-java/fontbox-0.1.0 0
dev-java/java-config-2.1.11-r3 2
dev-java/java-config-wrapper-0.16 0
dev-java/javacc-4.0-r4 0
dev-java/javatoolkit-0.3.0-r6 0
dev-java/junit-3.8.2-r1 0
dev-java/lucene-2.1.0-r1 2.1
dev-java/pdfbox-0.7.3-r2 0
dev-java/servletapi-2.4-r5 2.4
dev-java/sun-jacc-api-20070102 0
dev-java/sun-jaf-1.1.1 0
dev-java/sun-javamail-1.4.3 0
dev-java/sun-jce-bin-1.6.0 1.6
dev-java/sun-jdk-1.6.0.26 1.6 (X alsa jce nsplugin)

Reproducible: Always

Steps to Reproduce:
1. connect to a proxmox webserver ( http://www.proxmox.com )
2. start a virtual machine
3. open a vnc console
Actual Results:  
the console hangs up
Comment 1 Marco Clocchiatti 2011-08-04 07:33:39 UTC
Created attachment 282025 [details]
emerge.info
Comment 2 Marco Clocchiatti 2011-08-04 07:34:27 UTC
Created attachment 282027 [details]
log from java-console
Comment 3 Philippe Chaintreuil 2011-11-08 14:22:51 UTC
I'm seeing a similar issue with Java and the JCE when running DAVMail (which isn't in the port tree), very similar call stacK:

================================================================================
Exception in thread "ImapConnection-51862" java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
	at javax.crypto.KeyGenerator.a(DashoA13*..)
	at javax.crypto.KeyGenerator.<init>(DashoA13*..)
	at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
	at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(Unknown Source)
	at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(Unknown Source)
        [...]
================================================================================

I've tried reinstalling dev-java/sun-jre-bin-1.6.0.29 (USE="X alsa jce nsplugin") & dev-java/sun-jce-bin-1.6.0.

Unfortunately, the old JRE was removed from the tree, so I can't go back and see if it still works.
Comment 4 Philippe Chaintreuil 2011-11-08 14:32:35 UTC
Oh, and I get this to happen with www-client/firefox-7.0.1-r1 too.  Just go to https://www.java.com/en/download/installed.jsp and click the "Verify Java Version" button (with the jce enabled/installed).
Comment 5 Philippe Chaintreuil 2011-11-10 14:39:31 UTC
It looks like dev-java/sun-jre-bin-1.6.0.29 has soft-links that don't match up with dev-java/sun-jce-bin-1.6.0.

On my system /opt/sun-jre-bin-1.6.0.29/lib/security/local_policy.jar points to /opt/sun-jce-bin-1.6.0/lib/security/unlimited-jce/local_policy.jar, but it should point to /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/local_policy.jar (the /jre/ in the middle is the difference.

I did the following work-around as root:

cd /opt/sun-jre-bin-1.6.0.29/lib/security/
unlink local_policy.jar
unlink US_export_policy.jar
ln -s /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/local_policy.jar ./
ln -s /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/US_export_policy.jar ./

I'm going to go look at the ebuild in a few minutes.
Comment 6 Philippe Chaintreuil 2011-11-10 14:47:59 UTC
It's not even worth me posting a patch, lines 110 & 112 (both dosym lines in the if use jce block) just need "/jre" inserted before "/lib/".
Comment 7 Ralph Sennhauser (RETIRED) gentoo-dev 2011-11-11 21:10:56 UTC
(In reply to comment #6)
> It's not even worth me posting a patch, lines 110 & 112 (both dosym lines in
> the if use jce block) just need "/jre" inserted before "/lib/".

Fixed symlinks in -r1, thanks for looking into it.