1 Documentation is on the glom wiki:
3 http://www.glom.org/wiki/index.php?title=Development/OnlineGlom
7 * When using java-libglom in a servlet and doing a programmatic restart of Jetty
8 or Tomcat you will see this problem:
10 java.lang.UnsatisfiedLinkError: Native Library /path/to/libjava_libglom-0.1.so.0.0.0 already loaded in another classloader
12 The servlet will no longer respond to requests. Loading the native library in
13 the servlet rather than java-libglom removes the error message but the
14 servlet still doesn't work after a programmatic restart as tested with Jetty.
16 I'm not sure what the exact problem is but I've found a reference to this being a shortcoming
17 of using JNI in a servlet (see the comment by Tonio near the bottom):
19 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5075039
21 The solution to this problem might be to check if the native library has already been loaded
22 and only load it if it hasn't. As with moving the native code loading to the calling application
23 (servlet, junit test and ExampleDocumentLoad), this may not solve the problem of the non-working
24 servlet after a programmatic restart.
26 Until this problem is solved, here's how the servlet should be deployed using tomcat6:
30 sudo /etc/init.d/tomcat6 stop
32 * remove Tomcat cache:
34 rm -r /var/cache/tomcat6/*
36 * remove the old war and unpacked files
38 sudo rm -r /var/lib/tomcat6/webapps/{OnlineGlom,OnlineGlom.war}
40 * copy new war into the correct web directory
42 sudo cp path/to/uploaded/OnlineGlom.war /var/lib/tomcat6/webapps/
46 sudo /etc/init.d/tomcat6 start
48 Anybody using OnlineGlom will notice this restart as the servlet will be unresponsive during
49 this time and the page will need to be refreshed by the user.