I have an applet which requires execute priveledges and which communicates with javascript. It is signed.
Recently, a few users (from 2000 total) have been experiencing problems when starting IE in the morning. The applet fails to start. Closing and reopening the browser usually solves the problem and the applet works.
I enabled applet tracing and got the following in the console: (sorry about the German but the key entries are in English)
Java Plug-in 1.6.0_23
Verwendung der JRE-Version 1.6.0_23-b05 Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = C:\Documents and Settings\user
.....
network: Cache-Eintrag gefunden [url: http://{sharepointportal}/_layouts/WebParts2010/ieLauncher.jar?version=2011120106, Version: null] prevalidated=false/0
cache: Read manifest for http://{sharepointportal}/_layouts/WebParts2010/ieLauncher.jar?version=2011120106: read=400 full=400
cache: Reading Signers from 1121 http://{sharepointportal}/_layouts/WebParts2010/ieLauncher.jar?version=2011120106 | C:\Documents and Settings\user\Application Data\Sun\Java\Deployment\cache\6.0\63\a69c47f-2eba4659.idx
security: Zertifizierungsstellen-Stammzertifikate wurden geladen aus C:\PROGRA~2\Java\jre6\lib\security\cacerts
security: Bereitstellungszertifikate werden geladen aus C:\Documents and Settings\user\Application Data\Sun\Java\Deployment\security\trusted.certs
security: Bereitstellungszertifikate wurden geladen aus C:\Documents and Settings\user\Application Data\Sun\Java\Deployment\security\trusted.certs
security: Zertifikate werden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate wurden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate werden aus Internet Explorer ROOT-Zertifikatspeicher geladen
security: Zertifikate wurden aus Internet Explorer ROOT-Zertifikatspeicher geladen
security: Zertifikate werden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikate wurden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikatskette mithilfe von CertPath-API prüfen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Keine Zeitstempelinformationen verfügbar
security: Zuständigkeitslistendatei gefunden
security: Beginn der Überprüfung auf vertrauenswürdige Erweiterung für dieses Zertifikat
security: Beginn des Vergleichs der Zuständigkeitsliste mit diesem Zertifikat
security: CRL-Unterstützung ist deaktiviert.
security: OCSP-Unterstützung ist deaktiviert.
security: Diese End Entity-Überprüfung mit OCSP ist deaktiviert.
security: Prüfen, ob Zertifikat im Zertifikatsspeicher Deployment denied ist
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
security: Zertifikate werden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate wurden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate werden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikate wurden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikatskette mithilfe von CertPath-API prüfen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Keine Zeitstempelinformationen verfügbar
security: Zuständigkeitslistendatei gefunden
security: Beginn der Überprüfung auf vertrauenswürdige Erweiterung für dieses Zertifikat
security: Beginn des Vergleichs der Zuständigkeitsliste mit diesem Zertifikat
security: CRL-Unterstützung ist deaktiviert.
security: OCSP-Unterstützung ist deaktiviert.
security: Diese End Entity-Überprüfung mit OCSP ist deaktiviert.
security: Prüfen, ob Zertifikat im Zertifikatsspeicher Deployment denied ist
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
security: Zertifikate werden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate wurden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate werden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikate wurden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikatskette mithilfe von CertPath-API prüfen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Keine Zeitstempelinformationen verfügbar
security: Zuständigkeitslistendatei gefunden
security: Beginn der Überprüfung auf vertrauenswürdige Erweiterung für dieses Zertifikat
security: Beginn des Vergleichs der Zuständigkeitsliste mit diesem Zertifikat
security: CRL-Unterstützung ist deaktiviert.
security: OCSP-Unterstützung ist deaktiviert.
security: Diese End Entity-Überprüfung mit OCSP ist deaktiviert.
security: Prüfen, ob Zertifikat im Zertifikatsspeicher Deployment denied ist
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)
at java.lang.ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Ausnahme: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
Ignored exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)
at java.lang.ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Ausnahme: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
Ignored exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.plugin.javascript)
Correct me if I’m wrong but, as the problem is solved by restarting the browser, it can’t be a certificate or priveledge problem. Right?
Does anyone have an idea what it might be or what else I could do to get more information?
Thanks
UPDATE
The applet html
<APPLET ID='Launcher'
CODE='package.PortalLauncher.class'
ARCHIVE='ieLauncher.jar?version=2011120108'
CODEBASE='../../../_layouts/WebParts2010/'
WIDTH='0' HEIGHT='0'>
<div style='border: 1px red dotted; margin:10px;'>
Dieser Webbrowser unterstützt das APPLET-Tag nicht!<br/>
This browser does not support the APPLET tag!<br/>
</div></APPLET>
UPDATE2
The applet is there to allow applications to be started directly from the browser. The link onclick event calls the applet with the application URL. The applet is allowed to start the executable. It is on the company portal and offers direct access to all the application which the current user is allowed to use.
Therefore it is a javascript to java link.
UPDATE3
I changed to tag from APPLET to OBJECT and added MAYSCRIPT, SCRIPTABLE etc (see suggestions) and started to test. I had the idea to add a second page to the Start Page list in my browser. A number of users start IBM Host on Demand automatically so I thought I would try it too. That’s when the problems started for me. Every 2-3 times that I start the browser I get a problem with my applet. Looking at the trace, the difference which stikes me is that when the applet starts I get the following in the trace:
security: Prüfen, ob Zertifikat im Zertifikatsspeicher Deployment denied ist
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
security: Zertifikate werden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate wurden aus Bereitstellungssitzungs-Zertifikatspeicher geladen
security: Zertifikate werden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
basic: Applet geladen
security: Zertifikate wurden aus Internet Explorer TrustedPublisher-Zertifikatspeicher geladen
security: Zertifikatskette mithilfe von CertPath-API prüfen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Zertifikatssammlung aus ZA-Stamm-Zertifikatsspeicher abrufen
security: Keine Zeitstempelinformationen verfügbar
security: Zuständigkeitslistendatei gefunden
security: Beginn der Überprüfung auf vertrauenswürdige Erweiterung für dieses Zertifikat
security: Beginn des Vergleichs der Zuständigkeitsliste mit diesem Zertifikat
security: CRL-Unterstützung ist deaktiviert.
security: OCSP-Unterstützung ist deaktiviert.
security: Diese End Entity-Überprüfung mit OCSP ist deaktiviert.
security: Prüfen, ob Zertifikat im Zertifikatsspeicher Deployment denied ist
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
basic: Applet geladen
When the applet loading fails then I get:
security: Zertifikat wird im permanenten Bereitstellungszertifikatspeicher gesucht
basic: Applet geladen
What this is saying is that a certificate is being looked for. When it works the success messages are displayed. When it fails then nothing further is traced. i.e. the certificate was probably not found. When I refresh the page, then it is successful.
Ideas?
I suspect AlexR has identified the cause of the problem, but some extra comments.
Should be..
And this..
..is suspect (‘hidden applet’) and might cause the applet to be removed completely by over protective security plug-ins.
It is better to set a size of 20×20 and hide the applet by means of styles (CSS).
Make sure the HTML is validated.
I cannot explain the intermittent nature of the problem, but that is applets for you.
Update
The W3C on
display: noneEmphasis mine. So it is not exactly surprising to me. 😉
OTOH, what I actually meant was something along the lines of
visibility: hiddenPut a shallow wide applet element at the bottom of the page and it will hardly be noticed.
Other things you might investigate to make an applet disappear: