ClassCastException launching Applet under JRE 7u21

I'm working on a signed Applet that will no longer start under version 7u21 of the JRE, and I've been able to isolate the problem to the Java Plugin's cache. If I disable Temporary files in the Java Control Panel, then everything's file. If I enable Temporary files, I get this exception in the Java console on startup:
basic: exception: com.sun.deploy.net.DownloadEngine$2 cannot be cast to com.sun.deploy.cache.CacheEntry.
ExitException[ 3]java.lang.ClassCastException: com.sun.deploy.net.DownloadEngine$2 cannot be cast to com.sun.deploy.cache.CacheEntry
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The applet is being deployed using Oracle's deployJava script.
This is happening on all our test systems in Chrome, FireFox, IE 8 and 9, which reinforces that this is a plugin problem. It's currently impacting a production system that's been running just fine for over a year before this JRE update.
Any insight anyone has would be greatly appreciated.

Seems like you did proper research there, I would report your findings as a bug if there isn't already one similar to yours.

Similar Messages

  • Problems with signed Applet for File Download under JRE 1.4 (works with 1.3

    Dear all,
    i encountered a very strange behaviour with JRE 1.4x. A signed applet used for file download worked on all platforms (Windows NT, 2000 and XP wth/wthout SP...) until I installed JRE 1.4.x (1.4.1 or 1.4.2)
    I get an EOFException when downloading binary files (for ASCII it works fine) when trying to readByte() from a DataInputStream. But not immideately, but after x bytes in the while-loop. Security is fine (I know there have been changes to that in jre 1.4, the applet itself can be started an runs with ASCII files for transfer)
    Does anyone know, what has changed in jre1.4.
    As I said, it works fine under jre 1.3.x
    The relevant code is below: byte bt = dis.readByte(); causes the error
    try{
    // Get URL from Server
    URL uFile = new URL(sFilename);
    sThisURLFile = uFile.getFile();
    Integer inte = new Integer(i);
    //open input stream for the file on server
    DataInputStream dis = new DataInputStream(new BufferedInputStream
    (uFile.openConnection().getInputStream()));
    //open output stream for the file on local drive
    String sFilenameOnly = sThisURLFile.substring(sThisURLFile.lastIndexOf('/')+1);
    int iDotPos = sFilenameOnly.lastIndexOf(".");
    String sExt;
    if (iDotPos > 0) {
    sExt= sFilenameOnly.substring(iDotPos);
    } else {
    sExt = "";
    File fileOut = new File(sDownloadDir + sThisURLFile.substring(sThisURLFile.lastIndexOf('/')+1) );
    DataOutputStream dos = new DataOutputStream(new
    BufferedOutputStream(new FileOutputStream(fileOut)));
    //read one byte from input stream, and write that byte to output stream
    long nByte = 0;
    int iCnt = 0;
    iFilesizeDone ++;
    while (nByte < iFilesize){
    String sErrPs = new String();
    try{
    sErrPs = "00";
    byte bt = dis.readByte();
    sErrPs = "01";
    dos.writeByte(bt);
    } catch (EOFException ee)
    System.err.println("internal EOFException: " + ee.getMessage());
    System.out.println("Error Filesize is " nByte " of " iFilesize "---" + sErrPs);
    break;
    nByte++;
    iFilesizeDone ++;
    iCnt ++;
    if(iCnt >= 10240) {
    ShowProgress(nByte, iFilesize, iFilesizeDone, iFilesizeTotal); // repaint does not work during init-procedure
    iCnt = 0;
    line = "Progress: Total: " + ((iFilesizeDone*100)/iFilesizeTotal) + " perc, " + iFilesizeTotal/1024 +" kbytes" ;
    labLine.setText(line);
    //dos.flush(); // improves Client performance (Agent-Call!)
    dis.close();
    dos.close();
    }// End try
    catch (EOFException ee)
    System.err.println("EOFException: " + ee.getMessage()e);
    catch (SecurityException se)
    System.err.println("SecurityException: " + se.getMessage());
    catch (IOException ioe)
    System.err.println("IOException: " + ioe.getMessage());

    perhaps they've changed something with the file blocking.
    btw, you should try to use something like this
    DataInputStream dis = new DataInputStream(is);
    byte[] buffer=new byte[8192];
    int numBytesRead;
    while ( dis.available()>0 ) {
         numBytesRead = dis.read(buffer);
    }               

  • Why cant i run my applet on JRE 1.6 but on JRE 1.5?

    Hello,
    I know this is a very basic problem, but i still cannot get a justified answer for this problem. Its like i have an applet which is compiled in JDk j2sdk1.4.2_16. Now when i try to run this applet on my IE under jre 1.5.* family on all the client machines it works fine. But when i switch to jre 1.6.* family, i see the applet being displayed, but i cannot perform any operations on it i no mouse clicks work and i cannot open any file menu or my jdialog boxes.
    Is it because of the incompatibilities in jre 1.6, but wont it be backward compatible to that older version applets can run on this new jre. My applet seems to be a simple applet,with only one exception that it has lot of jframes and jpanel in it.
    This problem is killing me ..
    Can someone point me towards where can i find what all changes are made in JRE 1.6 over JRE 1.5 so that atleast i can compare what is causing my applet freeze in JRE 1.6.
    i went through the release notes but cant find anything useful there.
    Please help.

    Sun ensures that newer versions of the JRE are backward compatible. Your applet should work under the newest JRE version. Have you tried running the applet in a different browser (e.g., Firefox) with JRE 1.6 to eliminate it being an IE issue?

  • Problem in loading an applet using JRE 1.5

    Hi,
    I have an applet which is working fine under JRE 1.4, but the same applet failing to load by using JRE 1.5
    Problem Description:
    1. The images in the applet fails to load using JRE 1.5
    2. The Username and Password text box are also failing to initialize.
    Can anyone help me out in this.
    Is there any code changes required ?

    I wonder if you have the same problem as me... Maybe we can find a solution for us both, no need for me to open a new thread for this topic then...
    I wrote an applet using Swing and compiled it using JavaSDK 1.4.x. I also installed the 1.4.x JRE for both of my test browsers. In Mozilla 1.1 the applet displays properly all the time. In IE6 SP1 it sometimes works as intended but sometimes the applet simply stops working, as per my Java Console somewhere after invoking the "start" method. Parts of the applet simply become gray and when I resize it - I have a JFrame in my applet - the whole JFrame becomes gray and does not respond to input nor it redraws itself. Shutting down IE does not close the JFrame(although the java console reports normal program termination and cleanup) and the only way to close it is through the task manager. I am using Windows 98SE btw.
    Does it sound similiar to your problem? It happens ONLY with IE, not with Mozilla. Anybody has an idea on what it could be? I doubt there's an error in my code...

  • Java 7: Problems launching applets with jars on "file://" location

    Hi,
    We are experiencing a problem when updating our client's JRE from Java6 U 21 up to Java7 U 55.
    We have developed an Applet which is composed by several JAR files. Some of those JARs must be stored in local drive, and the JAR with the main Java class is stored on server.
    Let's supose we have a similar scenario like this:
    https://blahblahbah/bar.jar
    https://blahblahbah/test.html
    C:/foo.jar
    The code of test.html:
    <embed
      archive="file:///C:/foo.jar"
      cache_archive="bar.jar"
    />
    This code works fine on Java 6 and Applet is correctly loaded.
    However, with Java 7 a security exception is raised when trying to load JAR files from "file:///" location during Applet launch:
    java.lang.SecurityException: Permission denied: file:/C:/foo.jar
        at sun.plugin2.applet.Applet2Manager._loadJarFiles(Unknown Source)
    We have tried several tests using a java.policy file which grants all possible permisions:
    grant codeBase "file:/C:/foo.jar" {
        permission java.security.AllPermission;
    grant {
      permission java.security.AllPermission;
    We also tried to low Java's security level to "MEDIUM", with no success.
    We finally only managed to run the Applet if we explicity disable the "Next-Generation Plugin" with Internet Explorer 8. However, that's not a suitable solution, and still does not work with Mozilla family browsers.
    Eventhought with Mozilla browsers is still not working.
    Is there any restrictions in Java 7 that prevents to read jars from being loaded from local drive when launching Applets?
    Thanks in advance,

    Thank you baftos.
    I had read the whole message before posting mine. It's not the same problem. I'm able to run the sample signed applet always having the jar in the same location than the HTML page serving the applet via JNLP:
    <jar href="SignedAppletTest.jar" main="true"/>
    However, the security exception raises when trying to read that jar from local drive:
    <jar href="file://C:/SignedAppletTest.jar" main="true"/>
    ExitException[ 3]java.lang.SecurityException: Permission denied: file://C:/SignedAppletTest.jar
        at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    I have even tried to decompile JNLP2Manager class, without seeing anything useful on that loadJarFiles method
    The only way I managed to avoid the problem is unchecking the New Generation Plugin and running the Applet with IE. Not a suitable solution for me at all..

  • Using a DLL or .so in a JNLP-launched applet

    I have a 3rd-party JAR which includes code that requires a DLL (or .so on Linux) to work and I need to use it in a JNLP-launched applet. What's required with Java 6 Update 16?
    1. I believe I need to get the DLL inside its own JAR and mark it as a native library in the JNLP. Is that just a matter of using the jar command to put it in the JAR?
    2. Must the applet then be signed?
    3. If yes to (2), will the end user still get some kind of security warning before running the applet?
    4. If yes to (3), will the warning only appear the first time the applet is run and not again after the JAR is cached?
    5. Do I need to manually "load" the DLL inside the applet's code? If not, how else does it know where to find the DLL (like -Djava.library.path in an application)?
    Thanks,
    The Gibbon

    I have a 3rd-party JAR which includes code that requires a DLL (or .so on Linux) to work and I need to use it in a JNLP-launched applet. What's required with Java 6 Update 16?Nothing different than other JRE's, what's the question?That was an introduction to my set of 5 specific questions.
    1. I believe I need to get the DLL inside its own JAR and mark it as a native library in the JNLP. Is that just a matter of using the jar command to put it in the JAR?Yes it is.Good.
    2. Must the applet then be signed?No, AFAIKWell see hear's the problem. The Google research I did before I asked the questions was confusing as some people said it needed to be signed and others didn't. My own tests have encountered security exceptions and I was trying to know if they were because the applet wasn't signed. The whole purpose of me starting this thread was to save me a lot of time messing around with these kind of problems not knowing if it's even supposed to work or not.
    See? It's all so amazing easy that making a simple test would have taken less time than this whole thread.
    This is why we talked about spoonfeeding.I don't see that it's amazingly easy when you disagree with the majority of the posts and information I read which were in themselves contradictory. It's obviously not a clear cut subject and everyone has a different opinion. I was hoping someone who had tried what I am wanting to do could just tell me definitively if it was ever going to work.
    What's even more amazing is that you didn't add any duke!I have to say I don't know anything about adding dukes, that's why I didn't do it.
    Real thrill is you're probably gonna meet some real problem depending on your actual needs! LOL!
    BTW: most of us has good knowledge of JWS but isn't such an applet expert (which, maybe, you are), so, in your case expecially, coming here with a realWorldJavaWebStartFailure would have been for sure the best approach, that's all you should really understand, IMVOHO.I realise that JWS is not often used to launch true applets but still I hope someone here would have done it and been able to share their experience.

  • Problem running applet with JRE 1.3.X

    Hi,
    I've developed an applet that works fine with MS JVM and JRE 1.4, but fails under JRE 1.3.x.
    Anyone knows what i've todo to my applet to get compability with JRE 1.3x too.
    Thanks,
    rjc

    Are you compiling under 1.3x and then trying to run in MS and 1.4? If so please tell the errors you are getting when you compile or what you're having problems in.
    You're question is like me saying I have a feild full of volvo's from various years and I have a box of replacement parts from vaious years--but not nessisarally the same years as I have cars, which ones do I need to fix them? (impossible to say isn't it without more info)
    or as I usually say: "My crystal ball is in the shop, please supply specific information for what you want answered."

  • Eclipse running under JRE

    Hello gurus...
    I have seen eclipse working under JRE only. But how it can compile java files to class files if there is no javac.
    any clues???

    phoenix-supratim wrote:
    But could you be more specific. Exactly which compiler you are talking about.The eclipse compiler. I don't know how to be more specific than that. They have created their own compiler so you don't need a JDK to use it (and possibly for other reasons).
    Is there any other compiler available to compile java files to class files.Well, I guess OpenJDK have their own compiler too.
    If that is the case then for running jar files it needs a JVM. And if a JVM is already there in eclipse it should'nt have asked for a JRE in the first place.[Eclipse atleast need a jre to run]I didn't say Eclipse has its own JVM. I said it has its own compiler. It requires a JRE because JRE contains the JVM that is used to run any Java programs.
    Another thing I would like to know. I have added MAVEN plugin in my eclipse. I noticed that when eclipse working under JRE only, MAVEN gives warning that a jdk JVM should be there to successfully run MAVEN. Beacause it needs some jar files from JDK. Exactly which jar files does MAVEN need from JDK and which way those jar files are different from JRE jar files.JDK has additional libraries that the JRE doesn't have.
    Because all the jar files JDK have to initialize and run a JVM are all there in JRE.JDK includes the JRE, which includes the JVM. And the JDK does have things that the JRE doesn't (like the compiler).

  • Expired certificate unexpectedly works under JRE 1.4.2_06+

    Hi,
    I have a client trust store for server authentication containing an expired certificate.
    Under JRE 1.4.2_06 (and 1.5) the expiry is ignored (unexpected), however under 1.3 and 1.2 using the same code it is considered invalid (as expected).
    Why has the behaviour changed?
    Thanks,
    Martin.

    After looking at the fixes applied between these two versions of the JRE I've found the following against 1.4.2_04...
    4945571 consider removing validity check on trusted cert anchor selection
    But no information exists in the bug database regarding this change! :(
    Does anyone know what was done as part of this fix?

  • Launching applet in html

    Hallo,
    I'm launching my applet vie jnlp-file. But I need to create code to dynamically generate page launching applet with parameters. My jnlp-file:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp codebase="http://192.168.20.71/MyApplet" href="launch.jnlp" spec="1.0+">
    <information>
    <title>MyApplet</title>
    <vendor>rafal</vendor>
    <homepage href=""/>
    <description>MyApplet</description>
    <description kind="short">MyApplet</description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se java-vm-args="-Djava.security.policy=applet.policy -Xms32m -Xmx500m" version="1.6+"/>
    <jar eager="true" href="MyApplet.jar" main="true"/>
    <jar href="lib/jai_codec.jar"/>
    <jar href="lib/jai_core.jar"/>
    <jar href="lib/mlibwrapper_jai.jar"/>
    </resources>
    <applet-desc height="768" main-class="MyAppletMain" name="MyApplet" width="1024">
    <param name="DbUrl" value="http://192.168.20.71/MyApplet"/>
    <param name="PictureURL" value="http://192.168.20.71/MyApplet/GetPicture"/>
    <param name="Modalities" value="CT,MR,CR,SR,US,NM,XR,DX,XA,IO,DR,RF"/>
    </applet-desc>
    </jnlp>
    I have an example that launches an applet with following script:
    <script src="http://java.com/js/deployJava.js"></script>
    <script>
    var attributes = {
    codebase: [applet codebase],
    code: [class to launch],
    archive: [JAR file with the applet],
    width: [applet width],
    height: [applet height]
    var parameters = { [applet parameters] };
    var version = [JDK version];
    deployJava.runApplet(attributes, parameters, version);
    </script>
    How should I fill the attributes to be able to launch my applet? The format of parameters-attribute is for me unknown, how to pass more then one parameter?
    The applet uses addidional jar-files, how to include these into this script? Is there another way to start applet?
    with regards
    Rafal Ziolkowski

    rafzio1 wrote:
    ..What's wrong?1) First of all, put all this crap with JNLP files, the deployJava.js and JSPs aside for a while. (a)
    2) Develop a plain old HTML file for the applet.
    3) Configure the Java Control Panel to pop open the Java Console when it encounters an applet.
    4) Ensure your code does not [swallow exceptions|http://pscode.org/javafaq.html#stacktrace] *(<- link)* at any point.
    5) Try and load it in the HTML and [copy/paste the Java Console output|http://pscode.org/javafaq.html#exact] *(<- link).*
    6) If you can make that HTML available for us to see, post the URL. If not, at least copy/paste the HTML, and please include it in code tags so it is easy to read.
    a) OK - none of those are crap, but they are extra complications above and beyond what you need for some basic testing.

  • Launch applet from html from ff/ie/chrome but breaks chrome when xhtml

    The following will work as an html file. However I place the body into a jsf xhtml file. Chrome complains: "TypeError: Object#<Document> has no method 'write' " The deployJava.js doesn't work in pc based safari in any case - but direct <applet> works for html file. Any idea how to resolve?
    Monty
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <script src="http://www.java.com/js/deployJava.js"></script>
    <script type="text/javascript">
    try {
    // launch applet
    var attributes = { code:'aa.fx.applet.NewJApplet',  width:640, height:480} ;
    var parameters = {jnlp_href: 'newJnlpTemplate.jnlp'} ;
    deployJava.runApplet(attributes, parameters, '1.6');
    } catch(x) {
    alert(x);
    //]]>
    Edited by: 845430 on Mar 17, 2011 8:13 PM

    I'm guessing you'll get better answers on a Chrome forum, since Chrome seems to be the culprit.

  • Problems with applets on jre

    the computer no longer loads applets on ebay nor will it allow you to get in to pogo game rooms. I have tried all of the troubleshooting suggestions and all settings seem to be correct. I have also deleted jre and reinstalled it. what next?
    Dee

    Using the verbose mode on java, we have narrowed the problem down to the load sequence. The offending class appears to be "java.io.ObjectStreamField". We have tried using the command line options to get around the problem without success (stack, heap, etc). We have re-installed the SDK/JRE on the master node and the problem still exists.
    Has anyone seen this problem and found a solution to this?
    NOTE:
    The operating system is Scyld 28cz (Red Hat 7.2+errata underlying). The slave nodes only have a micro-kernel loaded and then load the remaining kernel and required libraries/files from the master node.

  • Authenticate twice when launching applet from IIS

    Help! Once a user is successfully logged in using basic authentication on IIS, he still gets prompted for a username/password from the sun JVM after the applet is launched. Is there any way around this other than:
    1) Using the MSJVM
    2) Making that directory that launches the applet Anonymous.
    Thanks
    Zamil

    If IIS got Basic or Intergrated Authentication on than updating would fix this.
    The jre will use the browsers settings to connect. I had this problem trying to see applets on the Internet
    through a proxy that required NTLM. 1.4.0 could not authenticate at all and 1.4.2 kept asking for my domain
    ID. Since this is a bad habbit for users to fill out their ID and password when opening Inernet pages we
    waited for a newer release and that fixed it.

  • JRE 7u21 breaks LiveConnect

    It looks like not all functions of liveconnect (JavaScript invokes Applet) work anymore. You can see that on the following Oracle Page, the demo is supposed to output a response which is produced by the JRE. This response worked in u17 but does not anymore in u21 (and it also breaks my business application by this).
    http://docs.oracle.com/javase/tutorial/deployment/applet/examples/dist/applet_InvokingAppletMethodsFromJavaScript/AppletPage.html
    For the demo page it looks like myapplet.Package..... does not work anymore. What else is not working?
    (The Demo page is not https protected, in the case of my business application however, it is a https page).

    Hello,
    I saw some lines in the release sheet of Java7u21:
    Area: deploy/plugin
    Synopsis: Per-Applet/Global Packages, Java and netscape Keyword support removed
    Starting in 7u21, the support for calling from JavaScript to Java via global java, netscape and Packages JavaScript keyword for Firefox/Chrome, and also the per-applet Packages keyword for IE, are all removed.
    Please, can you confirm that the support of the "myApplet.Packages" key word has been removed ? There is no longer a way to call a public method outside of the Applet class ?
    Thanks for you help.

  • Is there a way to remove "Applet running..." when launching Applet in JWS?

    Is there any way to remove the "Applet running..." message at the bottom of the applet when launch in JWS? I have searched in the forum and bug database and cannot find a reference in how to remove it.
    I remember in the old applet days (JDK 1.1, 1.2?), everybody are mad at the yellow warning message when launching a new frame from an applet window. It is hard to believe this issue reappears in JDK 1.4.
    FYI, all the jar files are signed. And I am using JDK 1.4.1.
    Thanks,
    Nelson Fong

    Dietz,
    Thanks for your response. Unfortunately, our application requested all-permission in the jnlp file, and all jar files are signed as well.
    In fact, the warning is more like a status bar. The message was changed from "Initializing Applet..." to "Applet running...." during init() method.
    Any help would be appreciated. Thanks

Maybe you are looking for

  • I am unable to connect to Essbase Server 11.1.1.3

    Hi Can anyone help me to solve this Essbase server Error. I am unable to connect to Essbase Server 11.1.1.3 2010-05-10 11:35:49,359 INFO [main] CSS is initialized as client. The default logger properties will be loaded com.hyperion.css.CSSSystem.<ini

  • Decompile JAR , Update .Class file , Compile?

    Is it possible to decompile a excutable JAR file, update the .class file and compile it again? I'm using DJ Decompile software. Need your expertise.. =P

  • How do i change the background theme color in keynote for ios

    Is there a way to change the background color theme in Keynote for iOS? Let's say I start with a Black or White theme, but I want it to be red, consistently on every slide. Is this possible?

  • HT5570 my friend apple id is locked ' how we can unlock it ?

    my friend have iphone 4s he has a bill from cellcom company in israel name hosam ismael this apple ID  locked and he cant use his iphone we try to unlock it in the site "MANAGE MY ID" i cant and its stay locked he dont understand english so he ask me

  • DMVPN - improve network performance

    Hi All, We have a dual hub dual dmvpn cloud network running EIGRP or about 50 and 100 sites in the coming future. I have configured it in a way for 25 spokes to designate hub1 as primary and the other 25 spokes to designate hub2 as its primary link.