Teeeeejirrrrr

I like food. I like hammers. I like bunnies.

Xythos Broken Advanced Upload Functionality

without comments

i_eat_tapes

We use Xythos at our workplace to provide a file repository for students and eventually faculty and staff. It’s basically a web front end for a file system.

My personal feelings about the product are somewhat ho-hum and indifferent. It makes funny noises under the hood, it’s a bit clunky, but it works, runs on Linux and it’s reliable.

So you’re probably here because you searched on this error:

java.lang.ClassFormatError: Truncated class file

The problem is that you’re probably running your Xythos installation over port 443 (as you should) but there are still components trying to pull files down from port 80. With Xythos, if SSL is enabled, any requests to port 80 get dumped over to 443, and you will get truncated errors like above.

The fix is to feed some hardcoded variables for your site name into the application so it does not do that, and use port 443 isntead.

We use version 7.1, and in our case the error was addressed by editing the following file, in your Xythos installation:

/path_to_xythos/wfs<version>/webapps/xythoswfs/upload_advanced.jsp

Now look for the text “UPLOAD Applet”, and you should see some source that looks like this:

<!-- UPLOAD Applet -->
<% if (l_showApplet) { %>
<div class="xy_content" style="margin-top: 5px;">
  <div id="uploadAppletDiv">
    <script type="text/javascript">
      var l_altMessage = "<%= p_msgBun.getString("NO_JAVA_PLUGIN_MESSAGE") %>";
      printUploadApplet("uploadAppletDiv",
        "<%= l_codeContext %>",
        "<%= l_sessionID %>",
        "<%= ServletUtil.makeHtmlSafe(l_baseWebdavServerURL) %>",

Change the following lines, so it looks like this:

<!-- UPLOAD Applet -->
<% if (l_showApplet) { %>
<div class="xy_content" style="margin-top: 5px;">
  <div id="uploadAppletDiv">
    <script type="text/javascript">
      var l_altMessage = "<%= p_msgBun.getString("NO_JAVA_PLUGIN_MESSAGE") %>";
      printUploadApplet("uploadAppletDiv",
<%--        "<%= l_codeContext %>",  --%>
        "https://yournamehere/xythoswfs",
        "<%= l_sessionID %>",
<%--        "<%= ServletUtil.makeHtmlSafe(l_baseWebdavServerURL) %>",  --%>
        "https://yournamehere",

You won’t need to restart the Xythos service, but now give your setup a whirl. Advanced Upload functionality should work now. Be aware that if you do this, drop-in upgrades might break this functionality, and you’ll need to edit the new files again.

Written by Tijger Tsou

February 23rd, 2009 at 11:29 am

Leave a Reply