Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10598 (closed)

Opened 11 years ago

Closed 11 years ago

Bug: stale webstart fails with ClassNotFound

Reported by: jamoore Owned by: atarkowska
Priority: critical Milestone: OMERO-4.4.9
Component: Deployment Version: 4.4.8
Keywords: n.a. Cc: java@…, ux@…, wmoore, atarkowska
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Will and I have both seen this issue when clicking on webstart for gretzky:

Caused by: java.lang.ClassNotFoundException: org.libjpegturbo.turbojpeg.TJ
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:345)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

This is caused by the cached JNLP configuration not being re-downloaded for the same URL in Java 1.6. We need to set the "Last-Modified" header.

See:

Attachments (1)

ss-webstart-cache.png (139.9 KB) - added by jamoore 11 years ago.
Workaround: open Java preferences, and delete the cached application.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by jamoore

Workaround: open Java preferences, and delete the cached application.

comment:1 Changed 11 years ago by jamoore

Started looking at something like this:

    c = Context(request, context)
    d = datetime.datetime.now()
    rsp = HttpResponse(t.render(c), content_type="application/x-java-jnlp-file")
    rsp["Expires"] = "Sat, 6 May 1995 12:00:00 GMT"
    rsp["Cache-Control"] = "no-store, no-cache, must-revalidate"
    rsp["Pragma"] = "no-cache"
    rsp['Last-Modified'] = d.strftime('%a, %d %b %Y %H:%M:%S GMT')
    return rsp

but this likely requires quite a bit of testing of the various versions, etc.

comment:2 Changed 11 years ago by jamoore

  • Cc java@… atarkowska added
  • Version set to 4.4.8

Are there any changes in the Java JARs that we need to worry about for 4.4.9? (i.e. will the configuration have changed?) If so, I think this counts as a blocker. If not, we can likely push unless someone would like to pick it up.

comment:3 Changed 11 years ago by atarkowska

  • Owner set to atarkowska

comment:4 Changed 11 years ago by atarkowska

Last edited 11 years ago by atarkowska (previous) (diff)

comment:5 Changed 11 years ago by atarkowska

It is possible to add view decorator

from django.views.decorators.cache import never_cache

@never_cache
def myview(request):
    # ...

https://docs.djangoproject.com/en/1.3/topics/cache/?from=olddocs#controlling-cache-using-other-headers

Result:

Last-Modified = Wed, 18 Sep 2013 12:35:03 GMT
Expires = Wed, 18 Sep 2013 12:35:03 GMT
Content-Type = application/x-java-jnlp-file
Cache-Control = max-age=0
Last edited 11 years ago by atarkowska (previous) (diff)

comment:6 Changed 11 years ago by atarkowska

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66302 sec.)

We're Hiring!