Skip to main content

Intermittent crashes of a 3rd party applet with JRE6U14.

2 replies [Last post]
petermak
Offline
Joined: 2009-11-17
Points: 0

Dear Colleagues

I am trying to understand the cause of a sporadic JRE/Plugin/JVM crash in an application that uses a 3rd-party applet for rendering documents. The crashes happen when the user selects a menu-item or functionality that leads away from the page that embeds the applet. All you get to see is that the applet crashes and at times the browser goes down with it. The vendor is reluctant to investigate. There is no possibility to collect log output from the Java console. All i have are the log/trace files written to C:\Documents and Settings\\Application Data\Sun\Java\Deployment\log directory.

The trace files written before the crash always indicate an OverlappingFileLockException while accessing the cached applet JAR file.
The applet is apparently torn down while some thread is still try to read certificates from the applet JAR file.

The applet works with JRE 1.6.0_05, but fails with RE6U14. I initially suspected improper use of the applet lifecycle methods or an invalid certificate used to sign the JAR file but I am not sure.

Has anyone come across a similar problem? Any idea what the reason might be?

========================= Extract from trace file ======================
basic: Starting applet teardown
basic: Finished applet teardown
Reading certificates from 7550 http://http.....com/../docviewerapplet.jar | C:\Documents and Settings\...\Sun\Java\Deployment\cache\6.0\60\5b8dbdfc-2277c51e.idx
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 10000
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 10000
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 9900
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 9800
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 9700
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 9600
network: SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : 9500
network: Cache-Entry found [url: http://http.....com/xy.class, Version: null]
network: Connection http://ihttp.....com/.../xy.class with Proxy=DIRECT
network: Connecting http://http.....com:80/ with Proxy=DIRECT
com.sun.deploy.net.cookie.CookieUnavailableException: No registered plugin for applet ID -1
at sun.plugin2.main.client.MessagePassingExecutionContext.doCookieOp(Unknown Source)
at sun.plugin2.main.client.MessagePassingExecutionContext.getCookie(Unknown Source)
at sun.plugin2.main.client.PluginCookieSelector.getCookieFromBrowser(Unknown Source)
at com.sun.deploy.net.cookie.DeployCookieSelector.getCookieInfo(Unknown Source)
at com.sun.deploy.net.cookie.DeployCookieSelector.get(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.setCookieHeader(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.DeployCacheHandler.get(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at start.A3rdPartyApplet.destroy(Unknown Source)
at sun.plugin2.applet.Applet2Manager$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
========================= Extract from trace file ======================

Thanks
Peter

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tcelvis
Offline
Joined: 2009-07-09
Points: 0

A possible reason why it works in 6u5 but not in 6u14 is that the next generation plugin is activated by default from 6u12 and onwards. The next generation plugin does not always behave in the way that you might expect. I suggest you look into the NGP documentation.

One "feature" of the NGP is that multiple applets on a page may be loaded in separate JVM instances, thereby effectively killing any possible communication between the applets. This has caused me a world of pain...

Apart from that, I get a JSException
"netscape.javascript.JSException: No registered plugin for applet ID 14"

when trying to call a JavaScript function from my applet. I have been unable to find any decent documentation that tells me what this means.

demonduck
Offline
Joined: 2008-03-14
Points: 0

> One "feature" of the NGP is that multiple applets on
> a page may be loaded in separate JVM instances,
> thereby effectively killing any possible
> communication between the applets. This has caused me
> a world of pain...
>

You and many others. But it's only because we are all too stupid to understand the sophisticated engineering that is behind decisions like this. (is their an icon for wincing?)

But seriously, the previous engineering team made many bad decisions and then blamed us for not being smart enough to understand those decisions. I hope Oracle's engineering team is more concerned about how Java is actually used by us.

And I hope the previous engineering team are all happy in their new jobs....