applet fails to load class from jar

后端 未结 4 1760
被撕碎了的回忆
被撕碎了的回忆 2021-01-14 15:43

Some users are complaining that the applet no longer works, When they view the java console they are greeted with a java.lang.noClassDefFoundError and checking my access log

相关标签:
4条回答
  • 2021-01-14 16:00

    The jar is getting corrupted in transit, We are looking at getting patches from oracle/bea for the server.

    It appears that if a connection is too slow (Modem speeds) that weblogic will signal the end of a transfer by sending a packet with len=0.

    The network will signal java saying the download completed successfully and then java fails with a java.lang.noClassDefFoundError.

    0 讨论(0)
  • 2021-01-14 16:02

    Are you sure the jar file contains all the necessary classes? Open it up in your favorite Zip application and double check. Maybe a recent build of that jar got messed up and doesn't have everything in it.

    0 讨论(0)
  • 2021-01-14 16:05

    I'm assuming that you have made some updates by your wording. It is highly likely that some users have a previous Jar file cached.

    When deploying a new applet version in a live configuration I perform the following:

    1. Ensure the page holding the applet is not cached - use HTTP no-caching techniques. You may want to redeploy from a new page with these headers to ensure that it's not the case.
    2. Deploy the jar file from a different URL for each update (I encode the version number in a directory, but you can equally rename the jar file).
    3. If applet performs any client server interaction ensure that you check version numbers and report incorrect version to the user.

    Even if you follow this the user may still have a problem, ask them to try these one at a time (listed in order they should try):

    1. Press refresh on the browser window.
    2. Restart all browser windows
    3. Uninstall all Java VMs found on "Add/Remove programmes" and reinstall latest Java (yes, they must do this at their own risk!)
    0 讨论(0)
  • 2021-01-14 16:12

    This can occur if the class itself can be loaded but some dependency of that class cannot be. Are there external JARs that are dependencies?

    0 讨论(0)
提交回复
热议问题